Re: [R] Problem with data frame when using xYplot?

From: Deepayan Sarkar <deepayan_at_stat.wisc.edu>
Date: Sat 14 May 2005 - 01:51:57 EST

On Friday 13 May 2005 10:36 am, Sander Oom wrote:
> Hi Deepayan!
>
> Deepayan Sarkar wrote:
> > On Friday 13 May 2005 08:07 am, Sander Oom wrote:
> >>An off list response from Mat Soukop (thanks Mat!!) provides an even
> >>more elegant solution (see code below)! I have included the original
> >>code, so people can decide whether to plot in a single panel or in
> >>multiple panels. Now we have a fully functional workaround to get
> >>plotmeans{gplots} for multiple factors using lattice! Great!
> >
> > Just out of curiousity, does replacing the 'xlim' and 'scales' arguments
> > above by
> >
> > xlim = levels(tmp$Position)
> >
> > do the same thing? It should with xyplot (which also allows the x
> > variable to be a factor), but xYplot may be bypassing that.
>
> You mean: xlim = levels(tmp$AltGeo)....yes it does!?

No, I meant exactly what I wrote, and my comment followed this piece of code (which you have deleted from your reply):



tmp$PosNum <- unclass(tmp$Position)
tmp
(labs <- unique(tmp$Position))
# plot factor levels in seperate panels
xYplot(Cbind(Sodium,Lower,Upper) ~ PosNum|AltGeo, data=tmp, nx=FALSE,

   xlim=c(0.5,2.5),
   ylim=c(min(tmp$Lower)-1,max(tmp$Upper)+1),    scales = list(x = list(at=seq(1, 2, by=1), labels = labs)),    xlab="Position", ylab="Sodium"
   )


> No clue how one would ever get comfortable with all these options!

By reading the manual, of course :-)

Deepayan



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat May 14 02:05:28 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:45 EST