g <- ggplot(data, aes(x=method_a))
g <- g + geom_histogram(bins=50)
g
This is confusing (even to me) as the aesthetic should really be part of the geom_histogram. (I first realized this looking over Stephan's slides (03-exploring-data.pdf).
I would propose this re-write:
g <- ggplot(data=data)
g <- g + geom_histogram(bins=50, aes(x=method_a))
g
Currently we have chunks such as:
This is confusing (even to me) as the
aes
thetic should really be part of thegeom_histogram
. (I first realized this looking over Stephan's slides (03-exploring-data.pdf).I would propose this re-write: