The following script is written by the author of a book on R--Andy Field: You can also download the small datafile, hiccups.dat, from this address:
http://www.sagepub.com/dsur/study/articles.htm The script: hiccupsData <- read.delim("Hiccups.dat", header = TRUE) hiccups<-stack(hiccupsData) names(hiccups)<-c("Hiccups","Intervention") hiccups$Intervention_Factor<-factor(hiccups$Intervention, levels = hiccups$Intervention) line <- ggplot(hiccups, aes(Intervention_Factor, Hiccups)) line + stat_summary(fun.y = mean, geom = "point") + stat_summary(fun.y = mean, geom = "line", aes(group=1),colour = "Red", linetype = "dashed")+ stat_summary(fun.data = mean_cl_boot, geom = "errorbar", width = 0.2) + labs(x = "Intervention", y = "Mean Number of Hiccups") saveInImageDirectory("04 Hiccups Line.png") Why does this script not give me a line? It's driving e crazy :-| [[alternative HTML version deleted]] ______________________________________________ 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.