
Plots and Tables from a Pooled DLNM Meta-Analysis
Source:R/sus_mod_plot_pool.R
sus_mod_plot_pool.RdProduces exposure-response curves, city-specific forest plots, and BLUP
spaghetti plots from a climasus_pool object returned by sus_mod_pool().
Arguments
- x
A
climasus_poolobject produced bysus_mod_pool().- type
Character. Plot type:
"overall"(default),"forest", or"spaghetti".- output_type
Character.
"plot"(default),"table", or"all"(named list$plot,$table,$data).- interactive
Logical.
TRUEconverts the ggplot2 output to an interactive plotly widget. DefaultFALSE.- base_size
Numeric. ggplot2 base font size. Default
12.- save_plot
Character or
NULL. File path to save the plot.- lang
Character. Language for labels:
"pt"(default),"en","es".- verbose
Logical. Print progress messages. Default
FALSE.
Value
Depending on output_type:
"plot"-> aggplotorplotlyobject."table"-> atibbleof the plotted data."all"-> a named list:$plot,$table,$data.
Plot types (type)
type | Description |
"overall" | Pooled exposure-response curve with CI ribbon |
"forest" | City-specific RR at exposure p75 with CI (original and BLUP) |
"spaghetti" | Per-city BLUP curves overlaid on the pooled curve |
Examples
if (FALSE) { # \dontrun{
pool <- sus_mod_pool(fits, lang = "pt")
sus_mod_plot_pool(pool, type = "overall", lang = "pt")
sus_mod_plot_pool(pool, type = "forest", lang = "en")
sus_mod_plot_pool(pool, type = "spaghetti", lang = "en")
out <- sus_mod_plot_pool(pool, output_type = "all")
out$table
} # }