Re: [R] barplot as Trellis graphic

2008-03-28 Thread hadley wickham
On Fri, Mar 28, 2008 at 1:42 AM, Agustin Lobo <[EMAIL PROTECTED]> 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 wo

Re: [R] barplot as Trellis graphic

2008-03-28 Thread Charilaos Skiadas
On Mar 28, 2008, at 2: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,

Re: [R] barplot as Trellis graphic

2008-03-28 Thread Agustin Lobo
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(2

Re: [R] barplot as Trellis graphic

2008-03-27 Thread Charilaos Skiadas
On Mar 27, 2008, at 1:47 PM, Agustin Lobo wrote: > Thanks, it was a matter of reshaping the data matrix as I usually have > it, ie: > datos <- > data.frame(x=abs(round(rnorm(100,10,5))),y=abs(round(rnorm > (100,2,1))),f=factor(round(runif(100,1,3 > > to become: > > datos2 <- > data.frame(V1=

Re: [R] barplot as Trellis graphic

2008-03-27 Thread Agustin Lobo
Thanks, it was a matter of reshaping the data matrix as I usually have it, ie: datos <- data.frame(x=abs(round(rnorm(100,10,5))),y=abs(round(rnorm(100,2,1))),f=factor(round(runif(100,1,3 to become: datos2 <- data.frame(V1=c(datos[,1],datos[,2]),"VAR"=c(rep("x",100),rep("y",100)),f=factor(c

Re: [R] barplot as Trellis graphic

2008-03-27 Thread Deepayan Sarkar
On 3/26/08, Agustin Lobo <[EMAIL PROTECTED]> wrote: > Dear list, > > Is there any way of making barplots as a Trellis graphic? Yes, the function to use is 'barchart'. -Deepayan __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo