Re: [R] five multiple plots with ggplot

2016-02-07 Thread Jeff Newmiller
Looks like the data frame needs to be reshaped before being given to ggplot. "melt" function from the "reshape2" package, or "gather" function from "tidyr" package are good tools for this. On Sun, 7 Feb 2016, Ulrik Stervbo wrote: Hi Stefano, you try to facet on 'variable' and 'scales' whic

Re: [R] five multiple plots with ggplot

2016-02-07 Thread Ulrik Stervbo
Hi Stefano, you try to facet on 'variable' and 'scales' which aren't part of your data.frame as far as I can see. The error 'At least one layer must contain all variables used for facetting' also tells you this - that at least one of the variables you use for facetting are missing. Hope this help