age_labels {poputils}R Documentation

Create Age Labels

Description

Create labels for age groups. The labels depend on the type argument:

Usage

age_labels(type, min = 0, max = 100, open = NULL)

Arguments

type

Type of age group labels: "single", "five", or "lt".

min

Minimum age. Defaults to 0.

max

Maximum age for closed age groups. Defaults to 100.

open

Whether the last age group is "open", ie has no upper limit.

Details

The first age group starts at the age specified by min. If open is TRUE, then the final age group starts at the age specified by max. Otherwise, the final age group ends at the age specified by max.

open defaults to TRUE when min equals zero, and to FALSE otherwise.

Value

A character vector.

See Also

reformat_age()

Examples

age_labels(type = "single", min = 15, max = 40)
age_labels(type = "five")
age_labels(type = "lt", max = 80)

[Package poputils version 0.3.1 Index]