View source: R/compute_boxplot.R
compute_boxplot | R Documentation |
Calculate boxplot values
compute_boxplot(x, var = NULL, coef = 1.5)
x |
Dataset-like object to compute boxplot values. There are built-in methods for data frames, grouped data frames, and ggvis visualisations. |
var |
Name of variable for which to compute boxplot values. The variable must be continuous. |
coef |
The maximum length of the whiskers as multiple of the inter-quartile range. Default value is 1.5. |
A data frame with columns:
min_ |
Lower whisker = smallest observation greater than or equal to lower hinge - 1.5 * IQR |
lower_ |
Lower hinge (25th percentile) |
median_ |
Median (50th percentile) |
upper_ |
Upper hinge (75th percentile) |
max_ |
Upper whisker = largest observation less than or equal to upper hinge + 1.5 * IQR |
outliers_ |
A vector of values that are outside of the min and max |
layer_boxplots
mtcars %>% compute_boxplot(~mpg)
mtcars %>% group_by(cyl) %>% compute_boxplot(~mpg)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.