Description Usage Arguments Details Value
Takes a integer, character, or factor vector and reorder the labels according to the frequency with which they appear.
1 | reorder_labels(x, decreasing = TRUE)
|
x |
integer or character vector, or factor variable |
decreasing |
boolean; if TRUE, orders in decreasing order, otherwise in increasing order |
It is assumed that the labels of x
have an inherent ordering. reorder_labels
reorders the labels such that the first label is assigned to the category with the highest frequency, the second label to the second most frequent category, and so on.
returns x
with labels ordered according to frequencies
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.