[R] Color of the plot which correspond to the group of the observations

Richard M. Heiberger rmh at temple.edu
Thu Sep 24 20:52:18 CEST 2009


It is easier in lattice

dp <- c(1,4,3,2,5,7,9,8,9,2)
tp <- 1:10
gg <- rep(1:3, c(3,3,4))
ddff <- data.frame(dp=dp, tp=tp, gg=gg)
xyplot(dp ~ tp, groups=gg, data=ddff)




More information about the R-help mailing list