Matt Pocernich said the following on 12/4/2006 12:32 PM: > I an using xyplot in lattice. I have data in a dataframe. Some columns > contains data, each from a different group. Is there a direct way to > specify a range of column names as a grouping variables? Currently, I > am stacking the data and creating a column with names. > > Thanks, > > Matt >
Hi, Matt, Yes. Try this: my.data <- data.frame(x = 1:10, y1 = 1:10, y2 = 11:20) xyplot(y1 + y2 ~ x, my.data) ## or if you want y1,y2 in panels xyplot(y1 + y2 ~ x, my.data, outer = TRUE) HTH, --sundar ______________________________________________ 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 and provide commented, minimal, self-contained, reproducible code.