qplot(hp, mpg, data=subset(mtcars, mpg<30),
shape=as.factor(cyl),
color=am,
facets=gear~cyl)
vs mtbadcars <- subset(mtcars, mtcars$mpg<30)
qplot(mtbadcars$hp, mtbadcars$mpg,
shape=as.factor(mtbadcars$cyl),
color= mtbadcars$am,
facets=(mtbadcars$gear)~(mtbadcars$cyl))
Why thanks, I do find it ridiculously fun to use short, readable names while maintaining encapsulation so that I can 1) keep multiple versions of a dataset around 2) not prefix every reference to a column in the dataset with the dataset name, cluttering the argument list and requiring 20 replacements or a kludgy temporary variable every time I want to plot a different subset.Oh wait, you were trying to convince me that was a bad thing?