Using this dataframe, df
:
bat.condition bat.group bat.money
1 safe 2825.882
2 safe 2931.875
1 glsa 6975.882
2 glsa 5407.500
1 studyabroad 3084.706
2 studyabroad 2253.750
1 jcc 4134.706
2 jcc 5550.625
1 eagg 4578.824
2 eagg 5456.250
I would like to plot a bar chart with group on the x axis, money on the y axis. Further, I would like the bars to be separated/factored by the condition in which they occur. So far I have used the following code and it is nearly ideal. I have the bars factored by group, I would just like to further factor it by condition.
qplot(factor(bat.group), data = df, geom = "bar", fill = bat.group,
weight = bat.money, position = "dodge")
Which produces the image seen here.