[R] Sorting boxplots

Erich Subscriptions er|ch@@ub@ @end|ng |rom neuw|rth@pr|v@@t
Mon Mar 14 18:02:39 CET 2022


Make the grouping variable into a factor end define the level ordering.
?factor will tell you more.

> On 14.03.2022, at 17:39, Ebert,Timothy Aaron <tebert using ufl.edu> wrote:
> 
> Set the factor levels rather than using the R default.
> 
> -----Original Message-----
> From: R-help <r-help-bounces using r-project.org> On Behalf Of Fernando Archuby
> Sent: Monday, March 14, 2022 12:13 PM
> To: r-help using r-project.org
> Subject: [R] Sorting boxplots
> 
> [External Email]
> 
> Dear all,
> By default, boxplot() sorts boxes alphabetically. How can I avoid it or set the order I need?
> Thank you!
> Fernando
> 
> --
> 
> *Dr. Fernando M. Archuby*
> CONICET-UNLP
> Teléfono Personal: +54-221-15-6129667.
> farchuby using gmail.com
> paleobiologia using gmail.com
> 
>        [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Dhelp&d=DwIFaQ&c=sJ6xIWYx-zLMB3EPkvcnVg&r=9PEhQh2kVeAsRzsn7AkP-g&m=_24UoDO2R6yvXJTn3WtrifPdRnEwsq-2bpB8JdUmLbsGgiophXPcfcC61_oNG-d-&s=TlrAlm9McaAx0H4vRoBR4uh_jzNqFW6MtRYT8gOUYtM&e=
> PLEASE do read the posting guide https://urldefense.proofpoint.com/v2/url?u=http-3A__www.R-2Dproject.org_posting-2Dguide.html&d=DwIFaQ&c=sJ6xIWYx-zLMB3EPkvcnVg&r=9PEhQh2kVeAsRzsn7AkP-g&m=_24UoDO2R6yvXJTn3WtrifPdRnEwsq-2bpB8JdUmLbsGgiophXPcfcC61_oNG-d-&s=b7M5MrheyswcvKJsFC5NLxYkAbKP261M76oItxGpd_M&e=
> and provide commented, minimal, self-contained, reproducible code.
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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