incremental_normalize {whippr} | R Documentation |
Normalize incremental test data
Description
Detect protocol phases (baseline, ramp, steps), normalize work rate, and time-align baseline phase (baseline time becomes negative).
Usage
incremental_normalize(
.data,
incremental_type = c("ramp", "step"),
has_baseline = TRUE,
baseline_length = NULL,
work_rate_magic = FALSE,
baseline_intensity = NULL,
ramp_increase = NULL,
step_start = NULL,
step_increase = NULL,
step_length = NULL,
...
)
Arguments
.data |
Data retrieved from |
incremental_type |
The type of the incremental test performed. Either "ramp" or "step". |
has_baseline |
A boolean to indicate whether the data contains a baseline phase. This is used for an incremental test only. Default to |
baseline_length |
The baseline length (in seconds) performed. |
work_rate_magic |
A boolean indicating whether to perform the work rate calculations. When set to |
baseline_intensity |
A numeric atomic vector indicating the work rate of the baseline. If the baseline was performed at rest, indicate |
ramp_increase |
A numeric atomic vector indicating the ramp increase in watts per minute (W/min). For example, if the ramp
was |
step_start |
In case your baseline was performed at rest, you can set in this parameter at which intensity the step test started. |
step_increase |
A numeric atomic vector indicating the step increase, in watts. For example, if the step increase was
|
step_length |
A numeric atomic vector indicating the length (in seconds) of each step in the step incremental test. |
... |
Additional arguments. Currently ignored. |
Value
a tibble
Examples
## Not run:
## 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
)
## get file path from example data
path_example_step <- system.file("step_cortex.xlsx", package = "whippr")
## read data from step test
df_step <- read_data(path = path_example_step, metabolic_cart = "cortex")
## normalize incremental test data
step_normalized <- df_step %>%
incremental_normalize(
.data = .,
incremental_type = "step",
has_baseline = TRUE,
baseline_length = 120,
work_rate_magic = TRUE,
baseline_intensity = 0,
step_start = 50,
step_increase = 25,
step_length = 180
)
## End(Not run)