hiccupsData <- read.delim("C:/R/Hiccups.dat", header = TRUE) hiccups<-stack(hiccupsData) names(hiccups)<-c("Hiccups","Intervention") line <- ggplot(hiccups, aes(Intervention, 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") textData <- read.delim("C:/R/TextMessages.dat", header = TRUE) textData$id = row(textData[1]) #textMessages = reshape(textData, idvar = c("id", "Group"), # varying = c("Baseline", "Six_months"), # v.names = "Grammar_Score", timevar = "Time", # times = c(0:1), direction = "long") textMessages<-melt(textData, id = c("id", "Group"), measured = c("Baseline", "Six_months")) names(textMessages)<-c("id", "Group", "Time", "Grammar_Score")