Re: [R] Connect lines in a dot plot on a subject-by-subject basis

2012-03-28 Thread John Sorkin
Thank you Bert. I will try your suggestion. You are ever gracious with your knowledge and expertise. John John David Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics University of Maryland School of Medicine Division of Gerontology Baltimore VA Medical Center 10 North Greene Street GRECC (B

Re: [R] Connect lines in a dot plot on a subject-by-subject basis

2012-03-28 Thread Bert Gunter
Oh ... you may need to specify a single color to avoid a rainbow: xyplot( Value ~ Time, Group = SubjectID, data = dat, type = "b", col = "black") -- Bert On Wed, Mar 28, 2012 at 2:39 PM, John Sorkin wrote: > I am trying to plot where data points from a give subject are connected by a > line. E

Re: [R] Connect lines in a dot plot on a subject-by-subject basis

2012-03-28 Thread Bert Gunter
Trivial with xyplot. Convert the data frame to long form (perhaps using reshape() or functions in the reshape2 package) to get ( in data frame dat) 3 columns: SubjectID Time Value (results do not have to be in time order or grouped by subject) Then: xyplot( Value ~ Time, Group = SubjectID, da

[R] Connect lines in a dot plot on a subject-by-subject basis

2012-03-28 Thread John Sorkin
I am trying to plot where data points from a give subject are connected by a line. Each subject is represented by a single row of data. Each subject can have up to five observations. The first five columns of mydata give the time of observation, columns 6-10 give the values at each time point. So