Displaying 1 result from an estimated 1 matches for "twater".
Did you mean:
water
2006 Oct 28
1
What determines the order of rows in a lattice barchart?
Hi,
What determines the order of the rows in a barchart?
Cheers,
Geoff.
Here is my code, and the data follows. If I have z in alpha order, the
barchart is in
some order I can't determine. I originally tried
rownames(twater)~twater$Cat, but the
chart wasn't in rownames(twater) order either.
library(lattice)
twater<-read.csv("totalwater.csv",strip.white=T)
twater$Cat<-ordered(twater$Cat,levels=(sort(levels(twater$Cat))))
sel<-twater$Cat=="A"
nm<-sort(rownames(twater))
z<-factor(n...