[R] plotting order in a barchart.: two problems

John Kane jrkrideau at yahoo.ca
Sat Apr 22 01:20:07 CEST 2006

I am new at R and have a simple problem, I think. I
have a matrix:   

   [,1]   [,2]  [,3]
a    .5     2    .4
b    4     3.4    4
c    4      4     2

I want a barchart with the [,1] column plotted as the
left-most group on a vertical bar chart or as the top
group on a horizontal chart.  However the plotting
order is , [,3] [,2] [,1].  

I also am having a problem getting the rows to plot on
a vertical chart in the order : a , b, c .  I achieved
this in a horizontal chart by doing a cbind(c,b,a) but
for some reason I do not seem to be getting this to
work for the vertical chart.  

Nothing in Sort() or Order() seem particularly
appropriate ( or I don't understand what the help is
telling me).  

Any suggestions would be appreciated.

More information about the R-help mailing list