Learn R Programming

visOmopResults (version 1.3.1)

boxPlot: Create a box plot visualisation from a <summarised_result> object

Description

Create a box plot visualisation from a <summarised_result> object

Usage

boxPlot(
  result,
  x,
  lower = "q25",
  middle = "median",
  upper = "q75",
  ymin = "min",
  ymax = "max",
  facet = NULL,
  colour = NULL,
  style = "default",
  type = "ggplot",
  label = character()
)

Value

A ggplot2 object.

Arguments

result

A <summarised_result> object.

x

Column or estimate name that is used as x variable.

lower

Estimate name for the lower quantile of the box.

middle

Estimate name for the middle line of the box.

upper

Estimate name for the upper quantile of the box.

ymin

Lower limit of error bars, if provided is plot using geom_errorbar.

ymax

Upper limit of error bars, if provided is plot using geom_errorbar.

facet

Variables to facet by, a formula can be provided to specify which variables should be used as rows and which ones as columns.

colour

Columns to use to determine the colours.

style

A character string defining the visual theme to apply to the plot. You can set this to NULL to apply the standard ggplot2 default style, or provide a name for one of the package's pre-defined styles. Refer to the plotStyle() function for all available style pre-defined themes. For further customization, you can always modify the returned ggplot object directly.

type

The desired format of the output plot. See plotType() for supported plot types.

label

Character vector with the columns to display interactively in plotly.

Examples

Run this code
dplyr::tibble(year = "2000", q25 = 25, median = 50, q75 = 75, min = 0, max = 100) |>
  boxPlot(x = "year")

Run the code above in your browser using DataLab