spiro_max {spiro} | R Documentation |
Return maximum values from cardiopulmonary exercise tests
Description
spiro_max()
returns a data.frame
with the maximum gas exchange
parameters of an exercise test.
Usage
spiro_max(data, smooth = 30, hr_smooth = FALSE)
Arguments
data |
A |
smooth |
Parameter giving the filter methods for smoothing the data.
Default is |
hr_smooth |
A logical, whether smoothing should also apply to heart rate
data. Default is |
Details
Before calculating the maximum values, the raw data is smoothed. Default
smoothing method is a 30-second rolling average. See the smooth
argument in spiro_smooth
for more options, such as breath-based
averages or digital filtering.
Parameters calculated are the maxima of oxygen uptake (absolute and relative), carbon dioxide output, minute ventilation, respiratory exchange ratio (RER), and heart rate. The maximum values are defined as the highest single data values after the smoothing.
For the maximum RER a different algorithm is used, as the RER during and after rest may exceed the peak value during exercise. Therefore only values during the last ten percent of the exercise time are considered for the RERmax determination. The RERmax calculation works best for data from tests without rest intervals (e.g., ramp tests) and with attached load protocol data.
Value
A data.frame
with the maximum parameter values of the data.
Examples
# Import and process example data sets
gxt_data <- spiro(file = spiro_example("zan_gxt"))
spiro_max(gxt_data)
# Use an averaging over a time interval of 15 seconds
spiro_max(gxt_data, smooth = 15)
# Use an averaging over an interval of 15 breaths
spiro_max(gxt_data, smooth = "15b")