get_intensity: Classify activity intensity

View source: R/get_intensity.R

get_intensityR Documentation

Classify activity intensity

Description

Supports intensity classification via energy expenditure with or without additional posture requirements (i.e., for sedentary behavior to be in lying/seated posture)

Usage

get_intensity(mets, posture = NULL, ...)

Arguments

mets

numeric vector of metabolic equivalents to classify

posture

character vector of postures

...

further arguments passed to cut

Details

If breaks and labels arguments are not provided, default values are <= 1.5 METs for sedentary behavior, 1.51-2.99 METs for light physical activity, and >= 3.0 METs for moderate-to-vigorous physical activity.

It is expected for the elements of posture to be one of c("lie", "sit", "stand", "other"). The function will run (with a warning) if that requirement is not met, but the output will likely be incorrect.

Value

a factor giving intensity classifications for each element of mets

Examples

mets <- seq(1, 8, 0.2)
posture <- rep(
c("lie", "sit", "stand", "other"), 9
)

intensity_no_posture <- get_intensity(mets)
intensity_posture <- get_intensity(mets, posture)
head(intensity_no_posture)
head(intensity_posture)


paulhibbing/PAutilities documentation built on Sept. 12, 2022, 1:46 a.m.