Dear List, I am wanting to produce a multiple line plot, and know I can do it with matplot but can't get my data in the format I need. I have a dataframe with three columns; individuals ID, x, and y. I have tried split() but it gives me a list of matrices, which is closer but not quite what I need. For example:
id<-rep(seq(1,5,1),length.out=100) x<-rnorm(100,5,1) y<-rnorm(100,20,5) mydat<-data.frame(id,x,y) split.dat<-split(mydat[,2:3],mydat[,1]) I would appreciate your help in either how to get this into a format acceptable to matplot or other options for creating a multiple line plot. Thanks, Tim Tim Clark Department of Zoology University of Hawaii ______________________________________________ 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.