if (FALSE) {
## get file path from example data
path_example <- system.file("ramp_cosmed.xlsx", package = "whippr")
## read data from ramp test
df <- read_data(path = path_example, metabolic_cart = "cosmed")
## normalize incremental test data
ramp_normalized <- df %>%
incremental_normalize(
.data = .,
incremental_type = "ramp",
has_baseline = TRUE,
baseline_length = 240,
work_rate_magic = TRUE,
baseline_intensity = 20,
ramp_increase = 25
)
## detect outliers
data_ramp_outliers <- detect_outliers(
.data = ramp_normalized,
test_type = "incremental",
vo2_column = "VO2",
cleaning_level = 0.95,
method_incremental = "linear",
verbose = TRUE
)
## analyze VO2max
perform_max(
.data = data_ramp_outliers,
vo2_column = "VO2",
vo2_relative_column = "VO2/Kg",
heart_rate_column = "HR",
rer_column = "R",
average_method = "bin",
average_length = 30,
plot = TRUE,
verbose = FALSE
)
}
Run the code above in your browser using DataLab