d<- read.csv("paired.csv")
summary(d)
## id before after
## Min. : 1.00 Min. :10.10 Min. :10.37
## 1st Qu.: 3.25 1st Qu.:12.65 1st Qu.:11.19
## Median : 5.50 Median :13.35 Median :14.14
## Mean : 5.50 Mean :13.02 Mean :13.56
## 3rd Qu.: 7.75 3rd Qu.:13.85 3rd Qu.:14.78
## Max. :10.00 Max. :14.10 Max. :18.98
t.test(d$before,d$after,paired=TRUE)
##
## Paired t-test
##
## data: d$before and d$after
## t = -0.68339, df = 9, p-value = 0.5116
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -2.331587 1.249699
## sample estimates:
## mean of the differences
## -0.5409441
d<- read.csv("paired_long.csv")
g1<-ggplot(d,aes(x=time,y=value)) +stat_summary(fun.y=mean,geom="bar",fill="lightgrey",col="black",width=0.7) +stat_summary(fun.data=mean_cl_normal,geom="errorbar",width=0.3)
g1

ylab="My text for the ylabel. Give name of variable and units"
xlab="My text for the xlabel. Give name of variable and units"
g1 + ylab(ylab) + xlab(xlab)

g1<-ggplot(d,aes(x=time,y=value)) + stat_summary(fun.y=mean,geom="point") +stat_summary(fun.data=mean_cl_normal,geom="errorbar")
g1

ylab="My text for the ylabel. Give name of variable and units"
xlab="My text for the xlabel. Give name of variable and units"
g1 + ylab(ylab) + xlab(xlab)
