I have a data frame like this
Date Team Score
1/1/2010 A 10
1/1/2010 B 15
1/1/2010 C 90
1/1/2010 D 100
1/1/2010 E 27
1/1/2010 F 76
1/1/2010 G 10
1/1/2010 H 85
1/1/2010 I 10
1/1/2010 J 5
1/1/2010 K 56
1/1/2010 K 60
1/1/2010 M 15
1/2/2010 A 10
1/2/2010 B 15
1/2/2010 C 90
1/2/2010 D 100
1/2/2010 E 27
1/2/2010 F 76
1/2/2010 G 10
1/2/2010 H 85
1/2/2010 I 10
1/2/2010 J 5
1/2/2010 K 56
1/2/2010 K 60
1/2/2010 M 15
etc
I would like to graph the top 5 high scoring teams over the time period and bottom 5 (lowest scoring teams) with ggplot2.
Is it feasible to do this with ggplot? I can graph all the teams but since I have lots of teams, I would like to be able to look at top scorers and low scorers.
any input will be appreciated?
X <- aggregate(Score~Team, dat, mean); Y <- X[order(X$Score), ]; head(Y, 5); tail(Y, 5)
– Tyler Rinker