Re: [R] bwplot reorder factor on y axis

From: Deepayan Sarkar <deepayan.sarkar_at_gmail.com>
Date: Thu 05 Jan 2006 - 07:29:10 EST

On 1/4/06, Michael Kubovy <kubovy@virginia.edu> 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?

See ?reorder.factor, which has a very similar example you can adapt. In your case, you probably want something like:

bwplot(reorder(factor(pairL), asym, median) ~ asym, oppK)

The call to factor is unnecessary if pairL is already a factor.

Deepayan

--
http://www.stat.wisc.edu/~deepayan/

______________________________________________
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:43:24 2006

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