Description Usage Arguments Value Examples
Reorder levels of a factor according to some corresponding numeric values in descending order
1 | desc_reorder(x, y, fun = mean)
|
x |
A vector of class factor to be reordered |
y |
A numeric vector |
fun |
a function whose first argument is a vector and returns a scalar, to be applied to each subset of x determined by the levels of y |
A factor with desired reordered levels
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.