# Some data that may look like yours:
ds <- data.frame(RTime = rep(letters[1:5], each = 5),
Treatment = rep(paste("t", 1:5, sep = ""), 5), mean = rnorm(25))
# put in some missing means
ds[c(15, 10, 8, 1, 7, 11, 4, 5, 6, 13), "mean"] <- NA
# current plot
qplot(factor(RTime),mean,data=ds,color=Treatment)
# illustrates the problem?
qplot(factor(RTime),mean,data=ds,color=Treatment, geom = "line")
# you need to specify group since your x values are factors
qplot(factor(RTime),mean,data=ds,color=Treatment, geom = "line", group
= Treatment)
# but this doesn't solve the problem
# a missing point, NA, will break a line so,
# I think the easiest way is to get rid of the missing rows then plot:
ds.no.missing <- subset(ds, !is.na(mean))
qplot(factor(RTime),mean,data=ds.no.missing,color=Treatment,na.rm=T,
geom = "line", group = Treatment) +
geom_point()
Hope that helps,
Charlotte
> --
> You received this message because you are subscribed to the ggplot2 mailing
> list.
> Please provide a reproducible example: http://gist.github.com/270442
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2
>
Maybe, I misinterpreted "A B C NA F" as times, but really they are
treatments? Does my example data correctly represent yours?
Charlotte