try xyplot() in lattice Something like:
xyplot(score ~age, group = subject,data = your frame, type= "b") -- Bert Gunter -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Terwilliger Sent: Thursday, August 07, 2008 3:02 PM To: r-help@r-project.org Subject: [R] help with longitudinal data plot Dear R Help, I am attempting to make a plot of longitudinal data, a sample data frame of which is shown below. I'd like to show all of the subjects in the same plot, with a set of connecting line segments for each subject. 'age' would be the x-axis and 'score' would be the y-axis. n subject age score 1 10123 12 51.06 2 10123 14 50.00 3 10123 15 62.22 4 10124 12 74.42 5 10124 13 72.73 6 10124 14 63.41 7 10125 16 54.55 8 10125 17 50.00 9 10125 18 54.35 10 10128 17 97.83 11 10128 18 97.87 12 10128 19 100.00 ... Any help would be appreciated. Regards, Robert Terwilliger ______________________________________________ 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. ______________________________________________ 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.