[R] bwplot reorder factor on y axis

Mark Herzog mherzog at prbo.org
Wed Jan 4 20:58:13 CET 2006


?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 at 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 at 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
> 
> 
>




More information about the R-help mailing list