Re: [R] xyplot 3 panels 3 different Y variables

2010-02-04 Thread RICHARD M. HEIBERGER
Continuing from your JUNK example: xyplot(Creatinine + Estrogen + Ratio ~ Day, data=JUNK, type="l", outer=TRUE, layout=c(1,3), scales=list(y=list(relation="free"))) __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-he

Re: [R] xyplot 3 panels 3 different Y variables

2010-02-04 Thread Deepayan Sarkar
On Thu, Feb 4, 2010 at 2:30 PM, Jacob Wegelin wrote: > > Often, when exploring a dataset, I'd like to plot several very different Y > variables against the same X variable, in panels stacked one over the other. > Is there an easy way to do this? > > I'd like to achieve an elegant look similar to t

Re: [R] xyplot 3 panels 3 different Y variables

2010-02-04 Thread Dennis Murphy
Hi: Here's a ggplot2 solution for your consideration: Start by melting the data using package reshape; this stacks the response variables and uses their names as factor levels in a conditioning plot: library(ggplot2) # loads plyr and reshape in the process junk <- melt(JUNK, id = "Day") dim

Re: [R] xyplot 3 panels 3 different Y variables

2010-02-04 Thread Gabor Grothendieck
As these are time series you can use plot.ts, plot.zoo or xyplot.zoo: tt <- ts(JUNK[-1]) plot(tt) library(zoo) z <- zoo(JUNK[-1], JUNK[,1]) plot(z) library(lattice) xyplot(z) On Thu, Feb 4, 2010 at 5:30 PM, Jacob Wegelin wrote: > > Often, when exploring a dataset, I'd like to plot several ver

[R] xyplot 3 panels 3 different Y variables

2010-02-04 Thread Jacob Wegelin
Often, when exploring a dataset, I'd like to plot several very different Y variables against the same X variable, in panels stacked one over the other. Is there an easy way to do this? I'd like to achieve an elegant look similar to the look achieved by lattice in conditioned plots--for instan