Re: [R] ggplot2 and facet_wrap help

2013-02-18 Thread francesca casalino
Dear Ista, Thank you! It works perfectly! -fra 2013/2/18 Ista Zahn : > Hi, > > You are making it more complicated than it needs to be. You already > provided the data.frame in the ggplot call, so you don't need to > specify it in the aes calls. The various factor() and as.factor() > calls are als

Re: [R] ggplot2 and facet_wrap help

2013-02-18 Thread Ista Zahn
Hi, You are making it more complicated than it needs to be. You already provided the data.frame in the ggplot call, so you don't need to specify it in the aes calls. The various factor() and as.factor() calls are also unnecessary. So stripping away this extra stuff your plot looks like ggplot(dat

[R] ggplot2 and facet_wrap help

2013-02-18 Thread francesca casalino
Dear R experts, I am trying to arrange multiple plots, creating one graph for each size1 factor variable in my data frame, and each plot has the median price on the y-axis and the size2 on the x-axis grouped by clarity: library(ggplot2) df <- data.frame(price=matrix(sample(1:1000, 100, replace =