Skip to contents

Box plot but whiskers show quantiles instead of outliers

Usage

qbox(
  df,
  x,
  g,
  probs = c(0.1, 0.25, 0.5, 0.75, 0.9),
  orientation = c("horizontal", "vertical")
)

Arguments

df

A data frame

x

The continuous variable

g

The categorical (group) variable

probs

Quantiles at which to draw box and whiskers (default: c(0.1, 0.25, 0.5, 0.75, 0.9))

orientation

Either horizontal (default) or vertical

Examples

qbox(iris, Sepal.Length, Species)

qbox(iris, Sepal.Length, Species, orientation='vertical')

qbox(iris, Sepal.Length, Species, c(0, 0.25, 0.5, 0.75, 1))