Java Mailing List Archive

http://www.r-help.com/

Home » R Help for Statistical Computing »

[R] Plotting longitudinal data

Jukka Koskela

2010-09-07

Replies: Find Java Web Hosting

Author LoginPost Reply
Hello,

Hope that someone could help me plotting longitudinal data below:

7213  3333330001  0.8300  13.05.09  1
1  3333330001  0.8700  09.02.05  NULL
4797  3333330001  0.7700  21.03.07  NULL
2399  3333330001  0.7800  12.04.06  NULL
2400  3333330002  NULL  27.03.06  NULL
7230  3333330002  0.8200  14.05.09  0
2  3333330002  0.8400  09.02.05  NULL
4798  3333330002  0.8700  20.03.07  0
4799  3333330003  0.9000  20.03.07  13
2401  3333330003  0.9300  27.03.06  16
3  3333330003  0.8400  10.02.05  NULL
7233  3333330003  NULL  14.05.09  1
4  3333330004  0.7200  10.02.05  NULL
4800  3333330004  0.8900  19.03.07  22
2402  3333330004  0.7300  29.03.06  27
7258  3333330004  0.7700  18.05.09  1

The second column is a patient_id, the third is the value I want to
plot against the fourth which is the date.

First I 'aggregate' the patient_ids:

id<-unique(dat$patient_id)

Then I try (and fail) to create a loop, that is supposed to plot the data:

for(i in 1:8480){patient_id==id[i]plot(date,value)}


What might be wrong?

And how could I only plot eg quintiles for the ones that go down fastest?

Thanks,

Jukka

______________________________________________
R-help@(protected)
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.
©2008 r-help.com - Jax Systems, LLC, U.S.A.