Re: [R] Problem with facet_grid in ggplot2

2011-04-11 Thread Brian Diggs
On 4/11/2011 9:33 AM, Simon Hayward wrote: Hi all, I am practising a bit with ggplot2 but I have a problem when I try to use facet_grid. The following code:- p<- ggplot(diamonds, aes(carat, ..density..)) + + geom_histogram(binwidth = 1) p + facet_grid(cut ~ clarity, margins=TRUE) produce the

[R] Problem with facet_grid in ggplot2

2011-04-11 Thread Simon Hayward
Hi all, I am practising a bit with ggplot2 but I have a problem when I try to use facet_grid. The following code:- p <- ggplot(diamonds, aes(carat, ..density..)) + + geom_histogram(binwidth = 1) p + facet_grid(cut ~ clarity, margins=TRUE) produce the following error:- Error in class(output[[