Skip to content
Prev 140482 / 398503 Next

ggplot2 argument handling odd

It's a see also from ?aes (or at least it is in the development
version).  facet_grid should already accept a string instead of a
function, so it should just work.
In general, you can use as.name, substitute and eval:

x <- as.name("mpg")
y <- as.name("wt")

eval(substitute(qplot(x, y, data=mtcars), list(x=x, y=y)))

Hadley