Skip to contents

Get a summary table of Box Whisker percentiles

Usage

getBoxWhiskerMeasure(
  data,
  dataMapping = NULL,
  y = NULL,
  group = NULL,
  quantiles = c(0.05, 0.25, 0.5, 0.75, 0.95)
)

Arguments

data

A data.frame to use for plot.

dataMapping

A BoxWhiskerDataMapping object mapping x, y and aesthetic groups to their variable names of data.

y

Name of y variable in data.

group

Name of grouping variable in data.

quantiles

Numeric values between 0 and 1 defining the quantiles to summarize

Value

A data.frame of summary statistics

Examples

# Get box-and-whisker plots of log-normal distributed data
boxData <- data.frame(x = c(rep("A", 500), rep("B", 500)), y = rlnorm(1000))

getBoxWhiskerMeasure(data = boxData, dataMapping = BoxWhiskerDataMapping$new(x = "x", y = "y"))
#>     N 5th percentile 25th percentile 50th percentile 75th percentile
#> A 500      0.2129402       0.5298514        1.032636        1.952436
#> B 500      0.2061554       0.5299338        1.035919        2.032836
#>   95th percentile     mean standard deviation geo mean geo standard deviation
#> A        4.229707 1.596014           1.884163 1.010762               2.620514
#> B        4.851134 1.723880           2.943851 1.033439               2.659442