adjust_ages {halk}R Documentation

Adjusts data to account for plus group or minimum age

Description

These functions performs two tasks. It lumps all ages greater than the plus group into that age, and it filters data only to those greater than or equal to the minimum age. adjust_plus_min_ages works on a vector whereas adjust_plus_min_ages_df words on a data.frame

Usage

adjust_plus_min_ages_df(data, minage = NULL, pls_grp = NULL)

adjust_plus_min_ages(age_vec, minage = NULL, pls_grp = NULL)

Arguments

data

Data with age as a column, or a numeric vector of ages

minage

Numeric. The minimum age; everything else is excluded

pls_grp

Numeric. The plus group; all ages older will be lumped into this group

age_vec

A vector of ages

Value

A data.frame similar to data, but with ages less than minage excluded and ages >= plus_group aggregated into that age


[Package halk version 0.0.5 Index]