size_order | R Documentation |
Useful when making bar plots and have the most common level in the bottom. Also possible to remove uncommon levels and create new level called other.
size_order(x, other_count = NULL, other_level = "Övriga")
x |
Vector |
other_count |
How many levels should be considered as other level |
other_level |
What the new level should be called |
table(ggplot2::diamonds$cut) in_size_order <- size_order(ggplot2::diamonds$cut) table(in_size_order) in_size_order <- size_order(ggplot2::diamonds$cut, 2, "Others") table(in_size_order)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.