Skip to contents

[Defunct]

wpp_age() is defunct. Pass population data directly to contact_matrix() via the survey_pop argument instead, as a data frame with columns lower.age.limit and population.

Usage

wpp_age(countries, years)

Arguments

countries

countries, will return all if not given

years

years, will return all if not given

Value

Always errors.

Examples

if (FALSE) { # \dontrun{
# population data now comes from a source of your choosing, for example
# the wpp2024 package (GitHub only):
# remotes::install_github("PPgp/wpp2024")
library(wpp2024)
data(popAge1dt)
uk_pop <- popAge1dt[
  name == "United Kingdom" & year == 2020,
  .(lower.age.limit = age, population = pop * 1000)
]
contact_matrix(
  polymod,
  countries = "United Kingdom",
  survey_pop = uk_pop,
  symmetric = TRUE
)
} # }