On 11/17/06, Turgut Durduran <[EMAIL PROTECTED]> wrote: >> Hello everyone, >> >> I am ploting a groupeddata object with formula: >> >> formula(mydatausegroup) >> BF ~ HO | ID/Infar/Day >> >> Using this command: >> plot(na.omit(mydatausegroup), displayLevel=2,layout=c(10,2),aspect=2) >> >> >> This trellis plot does almost what I want and produces a 10x2 trellis plot, >> each panel is labeled >> as ID/Infar where infarct is either 1 or 0. And in each panel, it plots BF >> vs HO for each Day. However, the "days" are labeled simply as "1,2,3,4" >> i>>nstead of their actual values (ranging from 1 to 8). This just mapped for >> each ID the "1 st measurement, 2nd measurement, 3rd measurement, 4th >> >>measurement". >> >> How can I get this trellis plot to use 8 different colors and label them >> correct?
>Hard to say without a reproducible example. As the footer of every >r-help message says: >PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >and provide commented, minimal, self-contained, reproducible code. >-Deepayan I apologize, I thought my example was fairly self-contained. I am attaching a sample data table (a subset). This is the code: library(nlme) library(lattice) tst <- read.table("sil.txt",header=TRUE) mydatausegroup <- groupedData( BF ~ HO | ID/Infa/Day, data=tst) plot(na.omit(mydatausegroup), displayLevel=2,layout=c(10,2),aspect=2) > min(mydatausegroup$Day) [1] 8 > min(mydatausegroup$Day) [1] 1 Note that layout is too large now, but that does not matter. Thanks, Turgut ____________________________________________________________________________________ Sponsored Link Mortgage rates near 39yr lows. $310k for $999/mo. Calculate new payment! www.LowerMyBills.com/lre
ID St Ty Infa Day Ang
HO BF
ST01 1 1 0
3 1 30 100
ST01 1 1 1
3 1 30 100
ST01 1 1 0
3 2 15 98.6749
ST01 1 1 1
3 2 15 140.3983
ST01 1 1 0
3 3 0 109.0045
ST01 1 1 1
3 3 0 193.9397
ST01 1 1 0
3 4 -5 119.0798
ST01 1 1 1
3 4 -5 219.2594
ST01 1 1 0
3 5 0 126.6429
ST01 1 1 1
3 5 0 208.6831
ST01 1 1 0
7 1 30 100
ST01 1 1 1
7 1 30 100
ST01 1 1 0
7 2 15 90.682
ST01 1 1 1
7 2 15 106.9133
ST01 1 1 0
7 3 0 155.0502
ST01 1 1 1
7 3 0 196.7507
ST01 1 1 0
7 4 -5 146.7675
ST01 1 1 1
7 4 -5 205.3458
ST01 1 1 0
7 5 0 154.9114
ST01 1 1 1
7 5 0 180.7299
ST02 1 1 0
1 1 30 100
ST02 1 1 1
1 1 30 100
ST02 1 1 0
1 2 15 97.1985
ST02 1 1 1
1 2 15 81.4464
ST02 1 1 0
1 3 0 82.0775
ST02 1 1 1
1 3 0 55.2152
ST02 1 1 0
1 4 -5 70.5043
ST02 1 1 1
1 4 -5 51.6814
ST02 1 1 0
1 5 0 42.9436
ST02 1 1 1
1 5 0 16.6769
ST02 1 1 0
2 1 30 100
ST02 1 1 1
2 1 30 100
ST02 1 1 0
2 2 15 119.1891
ST02 1 1 1
2 2 15 88.9082
ST02 1 1 0
2 3 0 83.1739
ST02 1 1 1
2 3 0 47.1947
ST02 1 1 0
2 4 -5 85.7725
ST02 1 1 1
2 4 -5 47.1364
ST02 1 1 0
2 5 0 92.6814
ST02 1 1 1
2 5 0 43.9386
ST02 1 1 0
4 1 30 100
ST02 1 1 1
4 1 30 100
ST02 1 1 0
4 2 15 52.7746
ST02 1 1 1
4 2 15 123.4777
ST02 1 1 0
4 3 0 71.9327
ST02 1 1 1
4 3 0 220.0603
ST02 1 1 0
4 4 -5 87.1547
ST02 1 1 1
4 4 -5 192.5085
ST02 1 1 0
4 5 0 48.5746
ST02 1 1 1
4 5 0 183.7578
ST02 1 1 0
8 1 30 100
ST02 1 1 1
8 1 30 100
ST02 1 1 0
8 2 15 84.4282
ST02 1 1 1
8 2 15 112.9679
ST02 1 1 0
8 3 0 60.8601
ST02 1 1 1
8 3 0 48.0961
ST02 1 1 0
8 4 -5 8.9163
ST02 1 1 1
8 4 -5 55.3164
ST02 1 1 0
8 5 0 55.3386
ST02 1 1 1
8 5 0 18.0497
ST03 1 2 0
2 1 30 100
ST03 1 2 1
2 1 30 100
ST03 1 2 0
2 2 15 135.6978
ST03 1 2 1
2 2 15 125.7974
ST03 1 2 0
2 3 0 177.4343
ST03 1 2 1
2 3 0 140.9099
ST03 1 2 0
2 4 -5 218.9578
ST03 1 2 1
2 4 -5 171.2844
ST03 1 2 0
2 5 0 237.0495
ST03 1 2 1
2 5 0 137.8077
ST03 1 2 0
3 1 30 100
ST03 1 2 1
3 1 30 100
ST03 1 2 0
3 2 15 205.7401
ST03 1 2 1
3 2 15 161.6701
ST03 1 2 0
3 3 0 259.4419
ST03 1 2 1
3 3 0 142.5546
ST03 1 2 0
3 4 -5 258.2196
ST03 1 2 1
3 4 -5 155.3289
ST03 1 2 0
3 5 0 259.1797
ST03 1 2 1
3 5 0 143.0106
ST03 1 2 0
5 1 30 100
ST03 1 2 1
5 1 30 100
ST03 1 2 0
5 2 15 93.0313
ST03 1 2 1
5 2 15 105.4623
ST03 1 2 0
5 3 0 88.8952
ST03 1 2 1
5 3 0 100.5108
ST03 1 2 0
5 4 -5 84.6731
ST03 1 2 1
5 4 -5 111.9458
ST03 1 2 0
5 5 0 NaN
ST03 1 2 1
5 5 0 NaN
ST03 1 2 0
6 1 30 100
ST03 1 2 1
6 1 30 100
ST03 1 2 0
6 2 15 118.69
ST03 1 2 1
6 2 15 106
ST03 1 2 0
6 3 0 171.402
ST03 1 2 1
6 3 0 149.1482
ST03 1 2 0
6 4 -5 181.4743
ST03 1 2 1
6 4 -5 166.6922
ST03 1 2 0
6 5 0 164.3213
ST03 1 2 1
6 5 0 147.3866
ST04 1 3 1
2 1 30 100
ST04 1 3 0
2 1 30 100
ST04 1 3 1
2 2 15 113.9694
ST04 1 3 0
2 2 15 108.7185
ST04 1 3 1
2 3 0 122.2897
ST04 1 3 0
2 3 0 125.6025
ST04 1 3 1
2 4 -5 NaN
ST04 1 3 0
2 4 -5 NaN
ST04 1 3 1
2 5 0 NaN
ST04 1 3 0
2 5 0 NaN
______________________________________________ [email protected] 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.
