mmmh, yes this method works... but I have to overlap this two graphs:
> xyplot( a ~ b | sites, data=dataset, col="red") > xyplot( c ~ b | sites, data=dataset, col="blue") a, b and c are columns in the same dataset. "Sites" is also a column in the dataset, but it's a factorial variables. How can I use your method? sorry for my ignorance! Francesco Nutini > Date: Fri, 10 Dec 2010 10:13:00 -0800 > From: ehl...@ucalgary.ca > To: nutini.france...@gmail.com > CC: r-help@r-project.org > Subject: Re: [R] [r] overlap different line in a xyplot (lattice) > > On 2010-12-10 07:04, Francesco Nutini wrote: > > > > dear [R] users, > > is there a way to plot different data (but with the same x-variables) in > > the same xyplot window? > > There are already a similar question, but the answer is not enought > > explanatory... > > Something like this? > > x <- rep(1:10, 2) > y1 <- rnorm(10); y2 <- rnorm(10) + 2 > y <- c(y1, y2) > g <- gl(2, 10) > xyplot( y ~ x, groups = g, type = 'b') > > Peter Ehlers > > > > > > > Thanks a lot, > > Francesco > > > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.