I'm trying to replicate a dotplot of batches/cases/treatments with lines crossing the factors in ggplot. That is something like this plot from Douglas Bates' linear models course which shows 6 groups on the y axis with a continuous response on the x axis with the mean for each group joined by a line:

Using the sleepstudy dataset bundled with the lme4 package as an example, I have:
library(ggplot2)
p <- ggplot(sleepstudy, aes(x=Reaction, y=reorder(Subject, Reaction)))
p <- p + geom_point()
print(p)
Which gives the basic dotplot, with subjects on the y axis in order of increasing reaction time.
I then create a data frame with mean reaction times for each subject:
mean_rxn <- function(df) mean(df$Reaction, na.rm=T)
sleepsummary <- ddply(sleepstudy, .(Subject), mean_rxn)
I am able to plot points at the mean for each subject:
p.points <- p + geom_point(data=sleepsummary, aes(x=V1, y=reorder(Subject, V1), size=10))
print(p.points)
But I can't get lines to cross the factors. That is, changing from geom_point to geom_line displays nothing
# does nothing
p.line <- p + geom_line(data=sleepsummary, aes(x=V1, y=reorder(Subject, V1)))
print(p.line)
Anyone have any ideas? Ultimately, my goal is to plot some model results on top of the raw data in this fashion, so methods that calculate means "on the fly" in the plotting of the original data frame are less useful because I need to get my data points from a more complex model fit.
Thanks for any help!
Ryan
