View source: R/get_data_specific_range.R
get_data_specific_range | R Documentation |
This function adapts the year and/or age range of the mortality dataset,
as obtained from the function get_mortality_data
,
for each country in the multi-population model.
get_data_specific_range(xv, yv, yv_spec, data, country, country_spec)
xv |
The new vector of ages. |
yv |
The new vector of years. |
yv_spec |
The new vector of years for the country of interest. |
data |
The multi-population mortality dataset. |
country |
The vector of countries. |
country_spec |
The country of interest. |
The argument data
must be (in the same form as) the output
from the function get_mortality_data
. See
european_mortality_data
for such an example mortality
dataset.
A list containing the following updated objects:
$M (male data), $F (female data)
$UNI (individual mortality data: $BE (Belgium), $NL (Netherlands), $AT (Austria), ...), $ALL (combined data)
$dtx (deaths), $etx (exposures), $wa (weights).
xv <- 0:90 yv <- 1988:2018 yv_spec <- 1988:2018 data <- MultiMoMo::european_mortality_data country <- names(data$M$UNI) country_spec <- "BE" data_new <- get_data_specific_range(xv, yv, yv_spec, data, country, country_spec)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.