> great! I knew you would have thought this through. That's perfect. As > always there's the trade-off between writing code and documenting the > code already written. In this case the trade-off turned toward the > code part I guess. > > Autodetection of strings by aes would be even greater but that would > prevent me to assign the actual strings "u", "x", "y" to an aes > element, which I don't see as a problem for non text related functions > though...
It can come in handy when combining multiple datasets: mtcarsq <- as.data.frame(mtcars ^ 2) ggplot(mtcars, aes(x=mpg, y=wt)) + geom_point(aes(colour = "Raw")) + geom_point(aes(colour="Squared"), data=mtcarsq) and aes is complicated enough as it is. Hadley -- http://had.co.nz/ ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.