[R] ggpubr: order of non-numeric x-axis items

Patrick (Malone Quantitative) m@|one @end|ng |rom m@|onequ@nt|t@t|ve@com
Sat Oct 26 15:08:55 CEST 2019


Try using relevel() to organize the categories in your factor in the
desired order. You may need to use relevel(as.factor()) .

On Sat, Oct 26, 2019 at 6:51 AM April Ettington
<aprilettington using gmail.com> wrote:
>
> Hi,
>
> When I use ggpubr with an x-axis utilizing descriptive categories (eg. bar
> chart for different colors of car), it sorts all of the labels
> alphabetically.  Is there a way to change this so it shows in the order I
> want?
>
> Thanks,
>
> April
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> 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