Description Usage Arguments Details Value Examples
View source: R/top_n_boxplot.R
This function adds top N highest values of every group to the boxplot visualization
1 | top_n_boxplot(dataset, value, group, n = 10)
|
dataset |
Dataframe or tibble with at least two columns |
value |
A numeric column that is used for ordering |
group |
A factor or character column used for grouping |
n |
An integer showing the number of top values to be plotted. Default value is 10. |
Function would not work if any of the groups has less than n observations
A ggplot object, visualization with two layers (boxplot and scatterplot)
1 2 3 | mtcars %>%
dplyr::mutate(am = as.factor(am)) %>%
top_n_boxplot(mpg, am, 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.