View source: R/get_intensity.R
get_intensity | R Documentation |
Supports intensity classification via energy expenditure with or without additional posture requirements (i.e., for sedentary behavior to be in lying/seated posture)
get_intensity(mets, posture = NULL, ...)
mets |
numeric vector of metabolic equivalents to classify |
posture |
character vector of postures |
... |
further arguments passed to |
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.
a factor giving intensity classifications for each element of
mets
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.