Learn R Programming

PAutilities (version 1.1.0)

get_intensity: 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, ...)

Value

a factor giving intensity classifications for each element of

mets

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.

Examples

Run this code
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)

Run the code above in your browser using DataLab