[R] Odp: Sorting groups in bwplot chart

Petr PIKAL petr.pikal at precheza.cz
Fri Aug 27 15:09:53 CEST 2010


Hi

make Month factor, sort its levels and do bwplot as you did

?factor
?levels

Regards
Petr


r-help-bounces at r-project.org napsal dne 27.08.2010 15:03:06:

> Hi all,
> 
> I am just curious how to sort the groups in a categorical box plot chart
> bwplot
> 
> here is the example:
> 
> d<-data.frame(sample(rep(month.abb,20), 100), runif(100,1,10));
> colnames(d) <- c("Month", "Value");
> bwplot(d$Month ~ d$Value);
> 
> as you can see Months are not sorted alphabetically. Does anybody know 
ho to
> sort those on the chart level?
> 
> Thank you
> Jan
> 
>    [[alternative HTML version deleted]]
> 
> ______________________________________________
> 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.



More information about the R-help mailing list