ggplot.boxplot.stats | R Documentation |
Calculate boxplot statistics for ggplot
ggplot.boxplot.stats(df, group_by, value.col, ncpu = 1)
df |
input data.frame. |
group_by |
column names or indices used for grouping data |
value.col |
column name of index of a value used to calculate boxplot statistics |
ncpu |
number of cores to calculate statistics. If more than 1 parallel::mclapply function will be used |
uses boxplot.stats as backend. All columns not in group_by will be dropped in output data.frame with outliers
list of two data.frames, the first one with boxplot statistics and the second one with outliers
d <- data.frame(a = sample(LETTERS[1:3], 100, replace = TRUE),
b = sample(LETTERS[1:3], 100, replace = TRUE),
c = sample(c(1:3, 10), 100, replace = TRUE),
d = sample(c(1:3, 10), 100, replace = TRUE))
ggplot.boxplot.stats(d, c("a", "b"), 3L)
ggplot.boxplot.stats(d, c("a", "b"), "c")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.