dp.output.bigpop: Get Spectrum's calculated population

View source: R/extract-dp.R

dp.output.bigpopR Documentation

Get Spectrum's calculated population

Description

Get Spectrum's calculated population by age, sex, and year in long or wide format

Usage

dp.output.bigpop(
  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

If you plan to extract multiple, time-dependent DemProj variables, it is more efficient to save the first year and final year of the projection, then pass those values to subsequent function calls. If you leave the first and final year NULL, the code will call dp.inputs.first.year() and dp.inputs.final.year() each time you request a variable.


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