[R] Overlay plot: boxplot and stripchart

Aldi Kraja aldi at wustl.edu
Fri Mar 13 20:03:19 CET 2009


Hi,
I have a data.frame of this kind:
x
 obs  movie earned rating
1        P1   3.2    xx
2        P1   4.2    xx
3        P1   5.2    xx
4        P1   6.2    xx
5        P2   3.5    xx
6        P2   6.5    xx
7        P2   7.5    xx
8        P2   4.5    xx
9        P2   4.5    xx
10       P3   4.8    x1
11       P4   7.3    x2
12       P4   3.2    x2
13       P4   3.3    x2
I want to overlay the following boxplot and stripchart. I think that I 
had seen before in a discussion a thread about stripchart in R (maybe 
from Dalgaard), but although searching for it I couldn't find it.

boxplot(x$earned ~ x$movie)
stripchart(x$earned ~ x$movie, vertical=T,data=x, method="jitter", pch=19)

Any suggestions are greatly appreciated, otherwise I have to go to 
points function.

Thanks,
Aldi

--




More information about the R-help mailing list