I'm trying to create a boxplot, which I've managed to do, but I cannot figure out how to specify the values for error bars. I've already calculated the values in my CSV file (below):
Here's my code:
# ggplot2.boxplot from http://www.sthda.com/english/wiki/easyggplot2?url=/3-easyggplot2/
install.packages("devtools")
library(devtools)
install_github("kassambara/easyGgplot2")
ggplot2.boxplot(data=df, xName='geno', yName='value', groupName='cond',
groupColors=c('orange','pink'), ytitle="Days", xtitle="Genotype")
And here's what I have:
df <- read.table(
text = "value geno cond sem
10.33 Control 0 0.1
10.39 Control 0 0.1
10.32 Control 0 0.1
10.58 Control 0 0.1
13.10 Control 7 0.14
12.94 Control 7 0.14
13.38 Control 7 0.14
13.55 Control 7 0.14
10.39 Exp1 0 0.03
10.26 Exp1 0 0.03
10.38 Exp1 0 0.03
10.41 Exp1 0 0.03
14.50 Exp1 7 0.3
13.00 Exp1 7 0.3
13.50 Exp1 7 0.3
13.75 Exp1 7 0.3
9.74 Exp2 0 0.02
9.79 Exp2 0 0.02
9.81 Exp2 0 0.02
9.83 Exp2 0 0.02
12.25 Exp2 7 0.13
11.86 Exp2 7 0.13
12.50 Exp2 7 0.13
12.29 Exp2 7 0.13",
stringsAsFactors = FALSE,
header = TRUE
)