DATA1Chamber
A tibble: 4 x 4
genotype NovelMouseChamber CChamber NovelObjectChamber
<chr> <chr> <chr> <chr>
1 EXP 457.457 54.4878 87.0871
2 ctrl 129.596 146.413 323.023
3 ctrl 306.306 73.7404 218.952
4 ctrl 369.603 117.518 111.912
I want a bar graph - with error bars
X axis has two groups = mean(EXP) vs Mean(ctrl)
y axis plotted against the 3 columns (NovelMouseChamber
, CChamber
, NovelObjectChamber
)
attempted to adapt this example unsuccessfully using the following edits:
dfm<- melt(Data1Chamber[, c("genotype", "NovelMouseChamberCum","CChamberCum", "NovelObjectChamberCum")], id.vars= 1)
plotted using:
ggplot(dfm,aes(x = genotype, y = value)) +
geom_bar(aes(fill = variable),stat = "identity",position = "dodge")
Expected graph I do not have all the data collected so I would add many more EXP and CTRL data points and then try to get error bars. I was just trying to see if I could generate the graph with the data I had so far.