[R] Group rows by common ID and plot?

DB1984 dannybolg at gmail.com
Fri Feb 25 22:02:21 CET 2011


So to simplify this a bit:

Using dataframe:

    name x1 x2 x3 x4 x5 x6 x7 x8
1   fred  2  3  4  6  7  8  9 12
2   fred  4  5  6  8  9 10 11 14
3   fred  6  7  8 10 11 12 13 16
4   fred  8  9 10 12 13 14 15 18
5  james 10 11 12 14 15 16 17 20
6  james 12 13 14 16 17 18 19 22
7  james 14 15 16 18 19 20 21 24
8  harry 16 17 18 20 21 22 23 26
9  harry 18 19 20 22 23 24 25 28
10  john 20 21 22 24 25 26 27 30
11  john 22 23 24 26 27 28 29 32
12  john 24 25 26 28 29 30 31 34
13  john 26 27 28 30 31 32 33 36


Is it possible to plot all columns x1:x8 in a similar manner to:

plot(df$x1:df$x8,group=df$name,data=df)


It seems like this is almost there, it just needs to plot multiple columns
rather than just one...?


-- 
View this message in context: http://r.789695.n4.nabble.com/Group-rows-by-common-ID-and-plot-tp3321955p3325181.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list