Re: [R] Scatter plot for repeated measures

2014-12-08 Thread farnoosh sheikhi
Thank you all. That was very helpful.  Farnoosh On Saturday, December 6, 2014 7:41 PM, Chel Hee Lee wrote: It seems that you would like to make a spaghetti plot (in a longitudinal data analysis).  You can use the function 'interaction.plot()'. > with(my.df, interaction.plot(TIME

Re: [R] Scatter plot for repeated measures

2014-12-06 Thread Chel Hee Lee
It seems that you would like to make a spaghetti plot (in a longitudinal data analysis). You can use the function 'interaction.plot()'. > with(my.df, interaction.plot(TIME, ID, X)) I hope this helps. Chel Hee Lee On 12/06/2014 02:24 AM, arun wrote: Not sure whether it is a scatterplot or

Re: [R] Scatter plot for repeated measures

2014-12-06 Thread arun
Not sure whether it is a scatterplot or just a plot with 3 lines. If it is the latter, library(reshape2) matplot(acast(my.df, TIME~ID, value.var='X'), type='l', col=1:3, ylab='X', xlab='TIME') legend('bottomright', inset=.05, legend=LETTERS[1:3], pch=1, col=1:3) A.K. On Friday, December 5,