Re: [R] bwplot reorder factor on y axis

From: Mark Herzog <mherzog_at_prbo.org>
Date: Thu 05 Jan 2006 - 06:58:13 EST

?factor (specifically, the levels= option)

oppK<-oppK[order(median(oppK$asym),]
oppK$pairL<-factor(oppK$pairL, levels=unique(oppK$pairL)) bwplot(pairL ~ asym, oppK)

Mark
Mark Herzog, Ph.D.
Program Leader, San Francisco Bay Research Wetland Division, PRBO Conservation Science 4990 Shoreline Highway 1
Stinson Beach, CA 94970
(415) 893-7677 x308
mherzog@prbo.org

Michael Kubovy wrote:
> Dear R-helpers,
>
> In bwplot(pairL ~ asym, oppK) is a factor. It displays pairL in
> alphabetical order. How do I tell it to display, pairL in the order I

> wish , i.e., so the medians of asym are in ascending order?
>
>
> _____________________________
> Professor Michael Kubovy
> University of Virginia
> Department of Psychology
> USPS: P.O.Box 400400 Charlottesville, VA 22904-4400
> Parcels: Room 102 Gilmer Hall
> McCormick Road Charlottesville, VA 22903
> Office: B011 +1-434-982-4729
> Lab: B019 +1-434-982-4751
> Fax: +1-434-982-4766
> WWW: http://www.people.virginia.edu/~mk9y/
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
>
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Jan 05 08:18:52 2006

This archive was generated by hypermail 2.1.8 : Thu 05 Jan 2006 - 14:04:38 EST