Learn R Programming

climatehealth (version 1.0.0)

plot_boxplots: Plot a grid of box plots for multiple numeric variables

Description

Plot a grid of box plots for multiple numeric variables

Usage

plot_boxplots(
  df,
  columns = NULL,
  select_numeric = FALSE,
  title = "Boxplots",
  ylabs = NULL,
  save_plot = FALSE,
  output_path = NULL
)

Arguments

df

The dataframe containing the data

columns

A character vector of numeric column names to plot

select_numeric

If TRUE, all numeric columns in df will be selected for plotting.

title

The overall title for the plot

ylabs

A character vector of y-axis labels (e.g., with units) corresponding to the columns.

save_plot

Whether to save the plot as a PDF

output_path

The file path to save the PDF (if save_plot is TRUE)