Learn R Programming

simplevis (version 6.2.0)

summarise_boxplot_stats: Summarise boxplot stats in a dataset or tibble.

Description

Summarise boxplot stats in a dataset or tibble.

Usage

summarise_boxplot_stats(
  data,
  var,
  names_vctr = c("min", "lower", "middle", "upper", "max"),
  ...
)

Arguments

data

A tibble or dataframe. Required input. Group the dataset as appropriate prior.

var

Unquoted variable from which to calculate boxplot stats. Required input.

names_vctr

A vector of names for the boxplot stats.

...

Passed to boxplot.stats

Value

A tibble or dataframe.

Examples

Run this code
# NOT RUN {
library(simplevis)
library(dplyr)
library(palmerpenguins)

penguins %>% 
  group_by(species) %>% 
  summarise_boxplot_stats(body_mass_g) 

penguins %>% 
  group_by(sex, species) %>% 
  summarise_boxplot_stats(body_mass_g, names_vctr = LETTERS[1:5]) 
  
# }

Run the code above in your browser using DataLab