Dear R-help subscribers,

I use xyplot to plot longitudinal data as follows:

score<-runif(100,-4,5)
group<-sample(1:4,100,rep=T)
subject<-rep(1:25,4)
age<-rep(runif(4,1,40),25)
df<-data.frame(score,group,age,subject)

xyplot(score~age|group, group=subject,
panel=function(...){
panel.loess(...,lwd=4)
panel.superpose(...)}
,data=df)

this produced a plot with four panels one for each group, with unique
plotting parameters for each subject.

How can I create a create a plot with a single panel where all four groups
are superimposed using different line colors and symbols for each group, but
preserving the longitudinal nature of the data (i.e. one line per subject).

Thanks for your help.

Osman


-- 
Osman O. Al-Radi, MD, MSc, FRCSC
Cardiovascular Surgeon
The Hospital for Sick Children
University of Toronto, Canada

        [[alternative HTML version deleted]]

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

Reply via email to