nhanes_pa_age_category: Convert ages to NHANES physical activity CDF age categories

View source: R/map-quantiles.R

nhanes_pa_age_categoryR Documentation

Convert ages to NHANES physical activity CDF age categories

Description

Ages are grouped into 10-year bins from ⁠[0,10)⁠ through ⁠[70,80)⁠. Ages greater than or equal to 80 are assigned to the oldest available CDF category, "[80,85)". Ages greater than 85 also map to "[80,85)", with a warning by default.

Usage

nhanes_pa_age_category(age, warn = TRUE)

Arguments

age

Numeric age in years.

warn

Logical. If TRUE, warn when non-missing ages greater than 85 are mapped into the "[80,85)" category.

Value

A character vector of NHANES age category labels.

Examples

nhanes_pa_age_category(c(8, 25, 84, 90))

mapnhanespa documentation built on June 2, 2026, 5:07 p.m.