combine_age {poputils}R Documentation

Aggregate Age Group Labels

Description

Convert age group labels to a less detailed classification. The three classifications recognized by combine_age() are "single", "five", and "lt", as defined on age_labels(). The following conversions are permitted:

Usage

combine_age(x, to = c("five", "lt"))

Arguments

x

A vector of age labels

to

Type of age classification to convert to: "five" or "lt". Defaults to "five".

Value

If x is a factor, then combine_age() returns a factor; otherwise it returns a character vector.

See Also

Examples

x <- c("0", "5", "3", "12")
combine_age(x)
combine_age(x, to = "lt")

[Package poputils version 0.3.1 Index]