On Fri, 6 Sep 2013, S Ellison wrote:

#Test data
ym <-as.data.frame(expand.grid(Y=c(2004:2006, 2010:2012), A=1:4)) #A is an 
arbitrary variable to give us some panels.
ym$x <- runif(nrow(ym))

library(lattice)

#Plots without, andf with, a groups argument

xyplot(x~Y|A, data=ym, type="l")
xyplot(x~Y|A, data=ym, type="l", groups=ym$Y<2007)

Is that what you had in mind?

  Yes, it is. Thanks very much for the lesson is using groups.

Rich

______________________________________________
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.

Reply via email to