downloadAsfr: Extract ASFR estimates from WPP2019. Mainly an util function...

downloadAsfrR Documentation

Extract ASFR estimates from WPP2019. Mainly an util function for other ones.

Description

We extract ASFRx from wpp2019, interpolated to exact dates. Different methods available. A vector of countries can handle, but with an unique sex. Row names are not indicative of countries.

Usage

downloadAsfr(Asfrmat, location = NULL, AsfrDatesIn, method = "linear")

Arguments

Asfrmat

numeric.

location

vector. UN Pop Div LocName or LocID

AsfrDatesIn

numeric. Vector of decimal dates.

method

character. Could be "linear", "exponential", or "power"

Value

numeric matrix interpolated asfr

Examples

# Total fertility ratio calculated from ASFRx downloaded from WPP19. 
# See `downloadnLx` for analogous examples on multiple countries or using codes instead of names. 
ASFR_Arg <- downloadAsfr(Asfrmat = NULL, location = "Argentina", AsfrDatesIn = 1950:2025)
## Not run: 
plot(1950:2025, as.numeric(colSums(ASFR_Arg))*5, xlab = "Year", ylab="TFR", ylim=c(1.5,4), t="l")

## End(Not run)

timriffe/DemoTools documentation built on Oct. 14, 2024, 12:53 p.m.