On Fri, Oct 10, 2008 at 9:18 AM, stephen sefick <[EMAIL PROTECTED]> wrote: > I would like to do the following in ggplot: > what am I missing? > > River.Mile <-c(202, 198, 190, 185, 179, 148, 119, 61) > TSS <- c(1:8) > DOC <- seq(2, by= 0.6, length.out=8) > z <- data.frame(River.Mile, TSS, DOC) > xyplot(TSS+DOC~River.Mile, data=z, auto.key=TRUE)
You need to do the data manipulation yourself. The easiest way is to use melt: zm <- melt(z, id = "River.Mile") qplot(River.Mile, value, data=dz, colour = variable) Hadley -- http://had.co.nz/ ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.