Re: [R] bwplot in ascending order

From: Mark Difford <mark_difford_at_yahoo.co.uk>
Date: Mon, 02 May 2011 01:32:16 -0700 (PDT)

On May 01 (2011) Harold Doran wrote:

>> Can anyone point me to examples with R code where bwplot in lattice is
>> used to order the boxes in
>> ascending order?

You don't give an example and what you want is not entirely clear.

Presumably you want ordering by the median (boxplot, and based on the example you point to, where the median is mentioned as an _example_).

Is this what you want?

##
bwplot(var1 ~ var2|condition, dat, index.cond = function(x, y) reorder(y, x, median)) ## if x is numeric
bwplot(var1 ~ var2|condition, dat, index.cond = function(x, y) reorder(x, y, median)) ## if y is numeric

Regards, Mark.

--
View this message in context: http://r.789695.n4.nabble.com/bwplot-in-ascending-order-tp3488557p3489544.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 05 May 2011 - 06:25:09 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 05 May 2011 - 07:00:06 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive