Plot cohort-style survival from Eurostat EUROPOP2023 assumptions
Source:R/life.R
plot_chance_alive_es_aasmr.RdPlots the conditional survival curves returned by chance_alive_es_aasmr().
The baseline projection (BSL) is shown in black and the lower-mortality
variant (LMRT) is shown in dark cyan.
Usage
plot_chance_alive_es_aasmr(ca, sex = c("m", "f"), population)Arguments
- ca
A tibble as returned by
chance_alive_es_aasmr(), with columnsprojection,Age, andchance_alive(and typicallygeo,sex,Year).- sex
Sex code:
"m"or"f"(case-insensitive). Used for labeling.- population
Population label/code to display in the subtitle (e.g.
"BG").
Examples
if (FALSE) { # \dontrun{
es_aasmr <- read_es_aasmr(file.path("data", "life"))
ca <- chance_alive_es_aasmr(es_aasmr, geo = "BG", sex = "m", age0 = 42, start_year = 2022)
p <- plot_chance_alive_es_aasmr(ca, sex = "m", population = "BG")
p
} # }