I would like to place two plots side by side using the ggplot2 package, i.e. do the equivalent of par(mfrow=c(1,2))
.
For example, I would like to have t
Yes, methinks you need to arrange your data appropriately. One way would be this:
X <- data.frame(x=rep(x,2),
y=c(3*x+eps, 2*x+eps),
case=rep(c("first","second"), each=100))
qplot(x, y, data=X, facets = . ~ case) + geom_smooth()
I am sure there are better tricks in plyr or reshape -- I am still not really up to speed on all these powerful packages by Hadley.