knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of whippr
is to provide a set of tools for manipulating gas exchange data from cardiopulmonary exercise testing.
whippr
?The name of the package is in honor of Prof. Brian J Whipp and his invaluable contribution to the field of exercise physiology.
You can install the development version of whippr
from Github with:
# install.packages("remotes") remotes::install_github("fmmattioni/whippr")
library(whippr) ## example file that comes with the package for demonstration purposes path_example <- system.file("example_cosmed.xlsx", package = "whippr") df <- read_data(path = path_example, metabolic_cart = "cosmed") df
df %>% interpolate()
## example of performing 30-s bin-averages df %>% interpolate() %>% perform_average(type = "bin", bins = 30)
## example of performing 30-s rolling-averages df %>% interpolate() %>% perform_average(type = "rolling", rolling_window = 30)
results_kinetics <- vo2_kinetics( .data = df, intensity_domain = "moderate", vo2_column = "VO2", protocol_n_transitions = 3, protocol_baseline_length = 360, protocol_transition_length = 360, cleaning_level = 0.95, cleaning_baseline_fit = c("linear", "exponential", "exponential"), fit_level = 0.95, fit_bin_average = 5, fit_phase_1_length = 20, fit_baseline_length = 120, fit_transition_length = 240, verbose = TRUE )
df_incremental <- read_data(path = system.file("ramp_cosmed.xlsx", package = "whippr"), metabolic_cart = "cosmed") vo2_max( .data = df_incremental, ## data from `read_data()` vo2_column = "VO2", vo2_relative_column = "VO2/Kg", heart_rate_column = "HR", rer_column = "R", detect_outliers = TRUE, average_method = "bin", average_length = 30, plot = TRUE, verbose = TRUE, ## arguments for `incremental_normalize()` incremental_type = "ramp", has_baseline = TRUE, baseline_length = 240, ## 4-min baseline work_rate_magic = TRUE, ## produce a work rate column baseline_intensity = 20, ## baseline was performed at 20 W ramp_increase = 25, ## 25 W/min ramp ## arguments for `detect_outliers()` test_type = "incremental", cleaning_level = 0.95, method_incremental = "linear" )
Would you like to perform VO2 kinetics analyses but don't know R? No problem! You can use our online app: VO2 Kinetics App
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.