[R] overlay 2 dot plots

Andras Farkas motyocska at yahoo.com
Fri Jun 21 21:43:02 CEST 2013


Dear All,

wonder if you would provide your insights on the following: the code:

library(lattice)
y <-c(1:58)
x <-runif(58,5,10)
z <-runif(58,8,12)
dataset <-data.frame(y,x)
dotplot(y ~ x, data = dataset)
dataset <-data.frame(y,z)
dotplot(y~z,data = dataset,col="red")

I would like to overlay the two plots, but no success so far, I tryed the add=TRUE command, but does not seem to work with this plot...

appreciate the insights,

Andras



More information about the R-help mailing list