Closed
Description
I'm trying to use aesthetics with the AsIs function to use values as they are.
library(ggplot2)
ggplot(data = iris, aes(Sepal.Length, Sepal.Width)) + geom_point(aes(size = I(5)))
# Error in data.frame(size = 5, PANEL = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, :
arguments imply differing number of rows: 1, 150
# thought process... produces error. ok, I can make it longer. trying again.
ggplot(data = iris, aes(Sepal.Length, Sepal.Width)) + geom_point(aes(size = I(rep(5, nrow(iris)))))
This produces a plot that is treated as a true value, rather than AsIs.
How can I make something a 'parameter' through the use of aes()?
- Barret