I have a dataframe with values corresponding to two separate groups evaluated over time. Mock data below:
Gene Name. Sample S1. Sample S2. Sample S3. Sample R1. Sample R2. Sample R3.
Gene 1 4 5 3 3 39 44
Gene 2 4 100 33 3 32 14
I melted my dataframe and compiled summary stats using the summarySE function. I then plotted my data using the following script:
plot = ggplot(tgastats2, aes(x=Gene Name, y=value, fill=Sample))
+ geom_bar(position=position_dodge(), stat="identity") +
+ geom_errorbar(aes(ymin=value-se, ymax=value+se),
+ width=.2,
+ position=position_dodge(.9))
What I would like to do is plot the values of S1-3 grouped together and R1-3 on the same plot separated with some space. Any help would be appreciated.