Re-levels data[[column]] as a factor whose levels follow order, which is
how the plot modules set the order of a categorical axis: the plot functions,
the statistics and their brackets all take the axis order from the column's
levels, so they stay in step.
Arguments
- data
A data frame.
- column
The name of the column.
- order
Character vector of levels in the order wanted, e.g. the value of a
level_order_input(). Merged as inlevel_order_choices(), with no cap on the number of levels.