Press "Enter" to skip to content

Ordering Boxplots in Base R

Steven Sanderson wants things in the right order:

The first example shows how to order the boxplots based on a specific order for the variable being plotted. We will use the built-in airquality dataset in R. The following code shows how to order the boxplots based on the following order for the Month variable: 5, 8, 6, 9, 7.

Click through to see that result, as well as two other examples.