add_bodymass {spiro}R Documentation

Calculate additional variables related to body mass for cardiopulmonary exercise testing data

Description

add_bodymass() adds body mass-related variables to processed gas exchange data.

Usage

add_bodymass(data, bodymass = NULL)

Arguments

data

A data.frame of the class spiro containing the gas exchange data. Usually the output of a spiro call.

bodymass

A numeric value to manually set the participant's body mass. Defaults to NULL to use body mass data from the file's meta data. Set to NA to ignore the meta data without setting a new body mass.

Details

Based on an individual's body mass, relative oxygen uptake (VO2_rel) and carbon dioxide output (VCO2_rel) are calculated. For running protocols, running economy (RE) is calculated.

Value

A data.frame of the class spiro containing the cardiopulmonary exercise testing data including variables related to body mass.

Examples

# get example file
file <- spiro_example("zan_gxt")

s <- spiro(file)
out <- add_bodymass(s, bodymass = 65.3)
head(out)

[Package spiro version 0.2.1 Index]