rename.age.grps: Rename negative columns as 5 year age groups

View source: R/dbRake.R

rename.age.grpsR Documentation

Rename negative columns as 5 year age groups

Description

Some databases may have 5 year age groups as -4, -9, -14, ... meaning 0-4, 5-9, 10-14, .... However, the dbRake function requires depends on age group column names as 'X-Y'. This is a helper function used in dbRake.

Usage

rename.age.grps(data, VarRegion, VarSex)

Arguments

data

A dataset with -X1, -X2, -X3, ... column names

VarRegion

Name of Region variable in all files (e.g., "LHA")

VarSex

Name of Sex variable in all files (e.g., "Sex")

Value

data with X-Y col names

See Also

The overall raking function: dbRake()

Other raking helpers: add.random.fraction.to.cols(), adjustSex(), allowNegsnoMargin(), calc.cols(), multiRake(), noNegsneedMargin(), noNegsnoMargin(), prep.prorate.col(), prorate.col(), prorate.row(), prorate(), read.inputs(), real.to.int(), rounded()


bcgov/dbutils documentation built on Sept. 30, 2022, 12:04 a.m.