dp.inputs.external.pop: Get the external population inputs used to calculate...

View source: R/extract-dp.R

dp.inputs.external.popR Documentation

Get the external population inputs used to calculate population adjustments

Description

Spectrum users may enter externally-produced population targets by sex, age, and year that can be used to align Spectrum population outputs with a reference population projection. dp.inputs.external.pop returns those population targets in long or wide format.

Usage

dp.inputs.external.pop(
  dp.raw,
  direction = "wide",
  first.year = NULL,
  final.year = NULL
)

Arguments

dp.raw

DemProj module data in raw format, as returned by read.raw.dp()

direction

Request "wide" (default) or "long" format data.

first.year

First year of the projection. If first.year=NULL, it will be filled in using dp.inputs.first.year()

final.year

Final year of the projection. If final.year=NULL, it will be filled in using dp.inputs.final.year()

Value

A data frame.

Details

Use of an external population file is optional and rare in Spectrum. Use dp.inputs.use.external.pop to check whether to check whether an external population was specified. Note that dp.inputs.external.pop will return population sizes of 0 for all years, sexes and ages if no external population was specified.


rlglaubius/SpectrumUtils documentation built on Dec. 20, 2024, 7:31 a.m.