Re: [R] bwplot

From: Deepayan Sarkar <deepayan.sarkar_at_gmail.com>
Date: Mon, 05 May 2008 12:13:17 -0700

On 5/5/08, cfinet <cedric.finet_at_ens-lyon.fr> wrote:
> Hi,
> I have 2 questions about bwplot in R :
> 1) How to change the order of my different boxes in the graph ?
> 2) How to rename the names of the differents boxes ? because I know how to
> do that with boxplot (using names) but I do not find the equivalent
> parameter in bwplot.

Both the labels and the order are derived from levels(y), where y is the categorical variable in your boxplot. You can specify both when you create a factor explicitly; see ?factor. (Also see ?reorder.factor, although I doubt that's what you want).

You can also change the labels in the bwplot call using xlim or ylim; e.g.,

bwplot(voice.part ~ height, data=singer, ylim = month.name[1:8])

-Deepayan



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 Mon 05 May 2008 - 19:25:22 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 Mon 05 May 2008 - 19:30:34 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