Re: [R] barplot as Trellis graphic

From: hadley wickham <>
Date: Fri, 28 Mar 2008 06:58:31 -0500

On Fri, Mar 28, 2008 at 1:42 AM, Agustin Lobo <> wrote:
> Thanks for your detailed explanation.
> You are right, a set of boxplots done with bwplot
> is a much better graphic for this type of data:
> bwplot(V1~VAR|f,data=datos2)
> This was not a good example. The barplot would be suited
> for counts, ie. species composition:
> datos4 <-
> data.frame(V1=round(runif(200,1,5)),SITE=factor(round(runif(200,1,3))))

The bar plot in ggplot2 ( automatically aggregates your data:


qplot(factor(V1), data=datos4, geom="bar", facets = . ~ SITE)

> Is there an R guide to Trellis graphics?

How about ?



______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Fri 28 Mar 2008 - 12:01:34 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 28 Mar 2008 - 12:30:25 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive