[R] Lattice barchart-reordered
Dieter Menne
dieter.menne at menne-biomed.de
Tue Oct 13 08:52:29 CEST 2009
Veerappa Chetty wrote:
>
> Hi,Can I use "reorder" function with barchart as in dotchart? Here are
> some
> codes which do not work for me.
> .. example remove
>
As your example is not self-contained (it should be), I cannot show it with
your data.
My preferred way is to reorder outside, because it enforces consistency when
I do several plots.
Dieter
library(lattice)
barchart(yield ~ variety | site, data = barley,
groups = year, layout = c(1,6),
ylab = "Barley Yield (bushels/acre)",
scales = list(x = list(abbreviate = TRUE,
minlength = 5)))
levels(barley$site) = c( "Waseca","Grand Rapids","Duluth","University
Farm","Morris" ,
"Crookston" )
barchart(yield ~ variety | site, data = barley,
groups = year, layout = c(1,6),
ylab = "Barley Yield (bushels/acre)",
scales = list(x = list(abbreviate = TRUE,
minlength = 5)))
--
View this message in context: http://www.nabble.com/Lattice-barchart-reordered-tp25865201p25867980.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list