Generalized function that works with any step_time and step_duration. Extracts the last minute of each step (steady-state) for averaging.
Usage
calculate_vars(
step_time,
db_MFO,
VO2max,
author,
step_duration = 180,
steady_state_duration = 60,
RER_cutoff = NULL,
energy_equivalents = "classic",
use_incomplete_step = FALSE
)Arguments
- step_time
how often the data was collected (in seconds).
- db_MFO
data frame with MFO test (columns: VO2, VCO2, RER, HR).
- VO2max
maximum oxygen uptake in ml/min.
equation set: "Frayn", "Jeukendrup", or "Peronnet".
- step_duration
duration of each exercise step in seconds (default 180 = 3 min).
- steady_state_duration
duration of steady-state period to average within each step, in seconds (default 60 = last minute).
- RER_cutoff
RER value above which data is excluded (default NULL = no cutoff), or one of "classic", "safe", "sedentary", "trained" (see [MFO()]).
- energy_equivalents
"classic" (default) or "source"; see [substrate_oxidation()].
- use_incomplete_step
logical (default `FALSE`). See [MFO()].