Learn R Programming

climatehealth (version 1.0.0)

plot_rr_by_pm_core: Create a relative risk plot across PM2.5 levels for a single region

Description

Generates a ggplot showing relative risk estimates and confidence intervals across PM2.5 levels for a given region.

Usage

plot_rr_by_pm_core(data, region_name = "All Regions", ylims = c(-2, 2))

Value

A ggplot object showing relative risk and CI.

Arguments

data

A data frame with columns: pm_levels, relative_risk, ci_lower, and ci_upper.

region_name

Optional character string used to label the plot title with a region name. Defaults to "All Regions".

ylims

Numeric vector of length 2 specifying y-axis limits. Defaults to c(-2, 2).