0

I want a data file as follows:

barrier   mode      t
S       journal     19884
S       journal     22164
N       journal     22414
N       journal     22127
S       ordered     22005
S       ordered     25179
N       ordered     20522
N       ordered     21486
S       writeback   23084
S       writeback   27305
N       writeback   26462
N       writeback   23048

I want to plot it on a bar chart where each bar will be a mode and its respective parameter barrier. Ie, mean (t for journal / S), mean (t for journal / N), mean (t is ordered / S), mean (t is ordered / N), mean (t is writeback / S), mean ( t is writeback / N).

What I have: barchart (t~mode, data = dadosW, groups = barrier, XLAB = "Mode", ylab = "t (KB / s)", main = "Random Write (Simple mean)," col = c ( "Darkblue", "Red"), scales = list (x = list (rot = 50, cex = 0.8))). But I know it just plot the values and not the mean of values.

EDIT: Just to make clear, my question is about use it in barchart, not just mean per group in data frame. It is different to Mean per group in a data.frame because I want to plot these data in barchart, not just show like text with aggregate function. How to make a graphic with it? I know use aggregate function (mediaW <- aggregate(dadosW$t, list(dadosW$mode, dadosW$barrier), mean)), but how to use it in barchart?

Community
  • 1
  • 1
El Mestre
  • 85
  • 10

0 Answers0