Skip to contents

Get life expectancy from the Human Mortality Database

Usage

gdt_hmd_lex(countries, age, type = c("male", "female", "total"))

Arguments

countries

A vector of country names

age

The life expectancy age

type

The type (one of male, female or total)

Value

A tibble with 3 columns: year, country and lex

Examples

if (FALSE) { # interactive()
# This example isn't run because it
# would need HMD credentials
c("Switzerland", "France") |>
  gdt_hmd_lex(age = 65, type = "total") |>
  head(5)
}