[R] Re-ordering the order of lattice graphics panels
Jun Yan
jyan at stat.wisc.edu
Wed Sep 25 16:13:53 CEST 2002
Factor levels may be specified by argument levels in function factor. The
following is an illustration:
> dat <- data.frame(x=rnorm(12), y=rnorm(12), group=rep(c("Artemia
larvae", "Abalone larvae", "Abalone spat"), 4))
> dat$group <- factor(dat$group, levels=c("Abalone spat","Abalone
larvae", "Artemia larvae"))
> bwplot(y ~ x | group, data=dat, layout=c(1,3))
Jun
On Wed, 25 Sep 2002, Smit,
A, Albertus, Dr wrote:
> Dear all
>
> I have made some lattice graphs (bwplot(dead ~ treat | group,...).
> 'group' is a factor with three levels (Artemia larvae, Abalone larvae
> and Abalone spat), and the result is a graph with three panels
> corresponding to the levels in 'group', ordered in alphabetical order
> from bottom to top, as expected.
>
> How does one re-order the order in which the levels of 'group' in the
> graph? I want Abalone spat at the bottom, followed by Abalone larvae,
> and Artemia larvae at the top. I have read most of the help on
> bwplots, panel.functions etc., but I am sure there is something
> obvious and simple I have missed.
>
> Any help appreciated.
>
> Albertus
>
>
>
>
> Dr. Albertus J. Smit
> Department of Botany
> University of Cape Town
> Private Bag Rondebosch
> 7700
> South Africa
> Tel. +27 21 689 3032
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list