[R] Plotting pairs of bars
Steve Murray
smurray444 at hotmail.com
Tue May 5 17:52:04 CEST 2009
Dear all,
I have a matrix called combine86 which looks as follows:
> combine86
Sim Mean Obs Mean Sim Sum Obs Sum
AMAZON 1172.0424 1394.44604 553204 659573
NILE 262.4440 164.23921 67973 41881
CONGO 682.8007 722.63971 205523 214624
MISSISSIPPI 363.0758 142.59883 124535 49054
AMUR 143.5857 89.30434 36040 22594
PARANA 702.3793 388.03030 162952 89635
YENISEI 208.1396 174.52722 83464 70509
OB 197.0399 162.82697 79013 63991
LENA 118.1100 77.49638 48307 32161
NIGER 374.8258 212.25714 66719 37145
ZAMBEZI 500.0000 485.87610 57000 54904
YANGTZE 358.4172 256.80246 58422 41602
For each of the rivers (which are the row names of this matrix), I wish to plot a bar for Simulated Mean and another for the Observed Mean. So far I've only been able to get R to stack the bars (using 'barplot) on top of one another, which isn't really what I want! I was hoping more for a pairing of bars (one 'Sim' and one 'Mean') followed by a gap, then the next pair of bars for the next river, a gap, and so on. Is this possible to do in R? If so, how?!
Many thanks,
Steve
_________________________________________________________________
[[elided Hotmail spam]]
More information about the R-help
mailing list