Learn R Programming

highcharter (version 0.9.4)

data_to_boxplot: Helper to transform data frame for boxplot highcharts format

Description

Helper to transform data frame for boxplot highcharts format

Usage

data_to_boxplot(
  data,
  variable,
  group_var = NULL,
  group_var2 = NULL,
  add_outliers = FALSE,
  ...
)

Arguments

data

The data frame containing variables.

variable

The variable to calculate the box plot data.

group_var

A variable to split calculation

group_var2

A second variable to create separate series.

add_outliers

A logical value indicating if outliers series should be calculated. Default to FALSE.

Examples

Run this code
# NOT RUN {
data(pokemon)

dat <- data_to_boxplot(pokemon, height)

highchart() %>%
  hc_xAxis(type = "category") %>%
  hc_add_series_list(dat)

dat <- data_to_boxplot(pokemon, height, type_1, name = "height in meters")

highchart() %>%
  hc_xAxis(type = "category") %>%
  hc_add_series_list(dat)
# }
# NOT RUN {
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab