Learn R Programming

climatehealth (version 1.0.0)

plot_air_pollution_an_ar_by_year: Plot the AN and AR by year

Description

Creates both Attributable Number (AN) and Attributable Rate (AR) plots aggregated by year in a single function call.

Usage

plot_air_pollution_an_ar_by_year(
  analysis_results,
  max_lag = 14L,
  include_national = TRUE,
  output_dir = NULL,
  save_plot = FALSE
)

Value

List with two ggplot objects: an_plot and ar_plot

Arguments

analysis_results

Results from analyze_air_pollution_daily

max_lag

Integer. Maximum lag. Defaults to 14.

include_national

Logical. Whether to include national results. Default TRUE.

output_dir

Character. Directory to save plot

save_plot

Logical. Whether to save