ggbMakeColumns: make the growth-adjusted quasi life table columns required by...

View source: R/ggb.R

ggbMakeColumnsR Documentation

make the growth-adjusted quasi life table columns required by GGB method

Description

Called by ggbChooseAges() and ggbcoverageFromYear(). This simply modulates some code that would otherwise be repeated. Users probably don't need to call this function directly.

Usage

ggbMakeColumns(
  codi,
  minA = 15,
  maxA = 75,
  nx.method = 2,
  deaths.summed = FALSE,
  mig.summed = deaths.summed
)

Arguments

codi

a chunk of data (single sex, year, region, etc) with all columns required by ggb()

minA

the lowest age to be included in search

maxA

the highest age to be included in search (the lower bound thereof)

nx.method

either 2 or 4. 4 is smoother.

deaths.summed

logical. is the deaths column given as the total per age in the intercensal period (TRUE). By default we assume FALSE, i.e. that the average annual was given.

mig.summed

logical. Is the (optional) net migration column mig given as the total per age in the intercensal period (TRUE). By default we assume FALSE, i.e. that the average annual was given.

Value

codi, with many columns added, most importantly rightterm, leftterm, and keep.


albinomatheus/toolbox documentation built on June 13, 2024, 5:42 a.m.