Title: Tools for Analyzing Lactate Thresholds
Version: 0.2.0
Description: Set of tools for analyzing lactate thresholds from a step incremental test to exhaustion. Easily analyze the methods Log-log, Onset of Blood Lactate Accumulation (OBLA), Baseline plus (Bsln+), Dmax, Lactate Turning Point (LTP), and Lactate / Intensity ratio (LTratio) in cycling, running, or swimming. Beaver WL, Wasserman K, Whipp BJ (1985) <doi:10.1152/jappl.1985.59.6.1936>. Heck H, Mader A, Hess G, Mücke S, Müller R, Hollmann W (1985) <doi:10.1055/s-2008-1025824>. Kindermann W, Simon G, Keul J (1979) <doi:10.1007/BF00421101>. Skinner JS, Mclellan TH (1980) <doi:10.1080/02701367.1980.10609285>. Berg A, Jakob E, Lehmann M, Dickhuth HH, Huber G, Keul J (1990) PMID 2408033. Zoladz JA, Rademaker AC, Sargeant AJ (1995) <doi:10.1113/jphysiol.1995.sp020959>. Cheng B, Kuipers H, Snyder A, Keizer H, Jeukendrup A, Hesselink M (1992) <doi:10.1055/s-2007-1021309>. Bishop D, Jenkins DG, Mackinnon LT (1998) <doi:10.1097/00005768-199808000-00014>. Hughson RL, Weisiger KH, Swanson GD (1987) <doi:10.1152/jappl.1987.62.5.1975>. Jamnick NA, Botella J, Pyne DB, Bishop DJ (2018) <doi:10.1371/journal.pone.0199794>. Hofmann P, Tschakert G (2017) <doi:10.3389/fphys.2017.00337>. Hofmann P, Pokan R, von Duvillard SP, Seibert FJ, Zweiker R, Schmid P (1997) <doi:10.1097/00005768-199706000-00005>. Pokan R, Hofmann P, Von Duvillard SP, et al. (1997) <doi:10.1097/00005768-199708000-00009>. Dickhuth H-H, Yin L, Niess A, et al. (1999) <doi:10.1055/s-2007-971105>.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.3
Suggests: bsplus, covr, datapasta, glue, knitr, miniUI, rhandsontable, rmarkdown, shiny, shinyjs, shinyWidgets, spelling, testthat (≥ 3.0.0)
Imports: magrittr, broom, dplyr, ggplot2, ggtext, patchwork, lubridate, minpack.lm, pracma, rlang, segmented, stringr, tidyr, forcats
Depends: R (≥ 2.10)
Language: en-US
Config/testthat/edition: 3
NeedsCompilation: no
Packaged: 2023-11-16 13:40:44 UTC; fmattioni
Author: Felipe Mattioni Maturana ORCID iD [aut, cre]
Maintainer: Felipe Mattioni Maturana <felipe.mattioni@med.uni-tuebingen.de>
Repository: CRAN
Date/Publication: 2023-11-16 15:40:02 UTC

lactater: Tools for Analyzing Lactate Thresholds

Description

logo

Set of tools for analyzing lactate thresholds from a step incremental test to exhaustion. Easily analyze the methods Log-log, Onset of Blood Lactate Accumulation (OBLA), Baseline plus (Bsln+), Dmax, Lactate Turning Point (LTP), and Lactate / Intensity ratio (LTratio) in cycling, running, or swimming. Beaver WL, Wasserman K, Whipp BJ (1985) doi:10.1152/jappl.1985.59.6.1936. Heck H, Mader A, Hess G, Mücke S, Müller R, Hollmann W (1985) doi:10.1055/s-2008-1025824. Kindermann W, Simon G, Keul J (1979) doi:10.1007/BF00421101. Skinner JS, Mclellan TH (1980) doi:10.1080/02701367.1980.10609285. Berg A, Jakob E, Lehmann M, Dickhuth HH, Huber G, Keul J (1990) PMID 2408033. Zoladz JA, Rademaker AC, Sargeant AJ (1995) doi:10.1113/jphysiol.1995.sp020959. Cheng B, Kuipers H, Snyder A, Keizer H, Jeukendrup A, Hesselink M (1992) doi:10.1055/s-2007-1021309. Bishop D, Jenkins DG, Mackinnon LT (1998) doi:10.1097/00005768-199808000-00014. Hughson RL, Weisiger KH, Swanson GD (1987) doi:10.1152/jappl.1987.62.5.1975. Jamnick NA, Botella J, Pyne DB, Bishop DJ (2018) doi:10.1371/journal.pone.0199794. Hofmann P, Tschakert G (2017) doi:10.3389/fphys.2017.00337. Hofmann P, Pokan R, von Duvillard SP, Seibert FJ, Zweiker R, Schmid P (1997) doi:10.1097/00005768-199706000-00005. Pokan R, Hofmann P, Von Duvillard SP, et al. (1997) doi:10.1097/00005768-199708000-00009. Dickhuth H-H, Yin L, Niess A, et al. (1999) doi:10.1055/s-2007-971105.

Author(s)

Maintainer: Felipe Mattioni Maturana felipe.mattioni@med.uni-tuebingen.de (ORCID)


Pipe operator

Description

See magrittr::%>% for details.

Usage

lhs %>% rhs

Add external resources

Description

This function was copied from golem

Usage

add_external_resources()

Adjust x-axis

Description

Adjusts the x-axis to show rest value at the beginning. Internal use only.

Usage

adjust_x_axis_plot(.data, plot)

Arguments

.data

The raw data.

plot

A ggplot2 object.


Bsln+ helper

Description

For internal use only and it won't be exported.

Usage

bsln_plus_helper(.data, data_augmented, fit, model, plus)

Arguments

.data

The raw data.

data_augmented

The augmented data from the model.

fit

The fit you would like to use for finding the lactate values associated to each one of the lactate thresholds.

model

The model chosen in fit,

plus

The plus value to be added to the baseline value.

Value

The results (intensity, lactate, heart rate) from the lactate threshold method.


Convert m/s to s/100m

Description

It converts speed, in m/s, to pace, in s/100m.

Usage

convert_to_pace(speed)

Arguments

speed

The speed to convert to pace.

Value

the converted pace


Demo data

Description

A dataset containing the lactate and heart rate data collected from a step-incremental test as an example

Usage

demo_data

Format

A data frame with 8 rows and 5 variables:

step

the number of the step, starting at zero for the baseline.

length

the length of each step.

intensity

the intensity performed on each step (in this case in watts).

lactate

the blood lactate concentration.

heart_rate

the heart rate associated with that step.


Produce data protocol skeleton

Description

This is an internal function used in run_data_input().

Usage

helper_data_protocol(
  input_steps,
  input_length_steps,
  input_starting_load,
  input_step_increase,
  input_heart_rate_data,
  input_completed,
  input_last_length_step,
  sport
)

Arguments

input_steps

The total number of steps from the incremental test.

input_length_steps

The length of each step, in minutes.

input_starting_load

The starting load.

input_step_increase

The step increase.

input_heart_rate_data

A boolean indicating whether heart rate data was collected.

input_completed

A boolean indicating whether the last step was fully completed.

input_last_length_step

If the last step was not fully completed, then indicate how long it lasted.

sport

The sport at which the incremental test was performed. One of cycling, running, or swimming.


Helper - Dmax

Description

For internal use only and it won't be exported.

Usage

helper_dmax_dmax(data_prepared, sport, plot)

Arguments

data_prepared

The data retrieved from prepare_data().

sport

The sport at which the incremental test was performed. One of cycling, running, or swimming.

plot

A boolean to indicate whether to generate a plot from each one of the methods.


Helper - Exp-Dmax

Description

For internal use only and it won't be exported.

Usage

helper_dmax_exp_dmax(data_prepared, sport, plot)

Arguments

data_prepared

The data retrieved from prepare_data().

sport

The sport at which the incremental test was performed. One of cycling, running, or swimming.

plot

A boolean to indicate whether to generate a plot from each one of the methods.


Helper - Log-Exp-ModDmax

Description

For internal use only and it won't be exported.

Usage

helper_dmax_log_exp_moddmax(data_prepared, sport, loglog_restrainer, plot)

Arguments

data_prepared

The data retrieved from prepare_data().

sport

The sport at which the incremental test was performed. One of cycling, running, or swimming.

loglog_restrainer

A scalar from 0 to 1 indicating the percentage of the data that you would like to restrain for fitting the Log-Log method. For example, 1 means no restriction (fits using the whole data), and 0.5 means that only the first 50% of the data will be used. Default to 1.

plot

A boolean to indicate whether to generate a plot from each one of the methods.


Helper - Log-Poly-ModDmax

Description

For internal use only and it won't be exported.

Usage

helper_dmax_log_poly_moddmax(data_prepared, sport, loglog_restrainer, plot)

Arguments

data_prepared

The data retrieved from prepare_data().

sport

The sport at which the incremental test was performed. One of cycling, running, or swimming.

loglog_restrainer

A scalar from 0 to 1 indicating the percentage of the data that you would like to restrain for fitting the Log-Log method. For example, 1 means no restriction (fits using the whole data), and 0.5 means that only the first 50% of the data will be used. Default to 1.

plot

A boolean to indicate whether to generate a plot from each one of the methods.


Helper - ModDmax

Description

For internal use only and it won't be exported.

Usage

helper_dmax_moddmax(data_prepared, sport, plot)

Arguments

data_prepared

The data retrieved from prepare_data().

sport

The sport at which the incremental test was performed. One of cycling, running, or swimming.

plot

A boolean to indicate whether to generate a plot from each one of the methods.


Calculate length of last step

Description

For internal use only.

Usage

helper_last_length_step(last_length_step)

Arguments

last_length_step

A string indicating the length of last step.


Render table for data input

Description

For internal use only.

Usage

helper_render_table(.data, sport)

Arguments

.data

The raw data.

sport

The sport at which the incremental test was performed. One of cycling, running, or swimming.


Interpolate intensity

Description

Interpolate intensity

Usage

interpolate_intensity(.data, interpolation_factor)

Arguments

.data

The raw data.

interpolation_factor

The interpolation factor to be used. This will depend on the sport chosen.


Check if all suggested packages are installed

Description

Check if all suggested packages are installed

Usage

is_installed()

Value

a boolean


Lactate curve

Description

It retrieves the lactate curve for plotting purposes.

Usage

lactate_curve(
  .data,
  intensity_column,
  lactate_column,
  heart_rate_column,
  fit = c("3rd degree polynomial", "4th degree polynomial", "B-spline"),
  include_baseline = FALSE,
  sport = c("cycling", "running", "swimming")
)

Arguments

.data

The raw data.

intensity_column

The name of the intensity column.

lactate_column

The name of the lactate column.

heart_rate_column

The name of the heart rate column, if applicable.

fit

The fit you would like to use for plotting the lactate curve. Options are ⁠3rd degree polynomial⁠, ⁠4th degree polynomial⁠, or B-spline.

include_baseline

A boolean to indicate whether to include the baseline value in the fit.

sport

The sport at which the incremental test was performed. One of cycling, running, or swimming.

Value

a list with the following elements:

data

a tibble containing the raw data with the columns intensity, lactate, and heart_rate.

lactate_curve

a tibble containing the data with the columns intensity and lactate for plotting the lactate curve according to the fit method chosen.

heart_rate_response

a tibble containing the data with the columns intensity and heart_rate for plotting the heart rate response using the linear method.

Examples

## Not run: 
lactate_curve(
  .data = demo_data,
  intensity_column = "intensity",
  lactate_column = "lactate",
  heart_rate_column = "heart_rate",
  fit = "3rd degree polynomial",
  include_baseline = TRUE,
  sport = "cycling"
)

## End(Not run)

Lactate threshold

Description

This is a general function that applies several lactate threshold methods at the same time.

Usage

lactate_threshold(
  .data,
  intensity_column,
  lactate_column,
  heart_rate_column,
  method = c("Log-log", "OBLA", "Bsln+", "Dmax", "LTP", "LTratio"),
  fit = c("3rd degree polynomial", "4th degree polynomial", "B-spline"),
  include_baseline = FALSE,
  sport = c("cycling", "running", "swimming"),
  loglog_restrainer = 1,
  plot = TRUE
)

Arguments

.data

The raw data.

intensity_column

The name of the intensity column.

lactate_column

The name of the lactate column.

heart_rate_column

The name of the heart rate column, if applicable.

method

The lactate threshold method to calculate. It can be one or many of the following: Log-log, OBLA, ⁠Bsln+⁠, Dmax, LTP, LTratio. See Details for more information. Default to c("Log-log", "OBLA", "Bsln+", "Dmax", "LTP", "LTratio").

fit

The fit you would like to use for finding the lactate values associated to each one of the lactate thresholds. Please, note that a few lactate thresholds have default methods for this and cannot be changed. Options are ⁠3rd degree polynomial⁠, ⁠4th degree polynomial⁠, or B-spline. See Details.

include_baseline

A boolean to indicate whether to include the baseline value in the fit.

sport

The sport at which the incremental test was performed. One of cycling, running, or swimming.

loglog_restrainer

A scalar from 0 to 1 indicating the percentage of the data that you would like to restrain for fitting the Log-Log method. For example, 1 means no restriction (fits using the whole data), and 0.5 means that only the first 50% of the data will be used. Default to 1.

plot

A boolean to indicate whether to generate a plot from each one of the methods. Default to TRUE.

Details

Log-log

The lactate response (i.e., log of lactate vs intensity) is divided into two segments. A segmented regression is then performed such that the lactate curve would present one breaking point. The exercise intensity at which the breaking point occurs is then considered as Log-log (Beaver et al., 1985). Caution: this method might require a double-check via a visual inspection, depending in some cases.

OBLA

The Onset of Blood Lactate Accumulation (OBLA) is the exercise intensity at fixed lactate of 2.0, 2.5, 3.0, 3.5, and 4.0 mmol/L (Heck et al., 1985, Kindermann et al., 1979; Skinner & Mclellan, 1980). The lactate curve is usually fitted using a 3rd order polynomial regression curve, but the user can define another method (4th degree polynomial or B-spline).

Bsln+

In the baseline plus method (Bsln+), the exercise intensity at which lactate increases to 0.5, 1.0, and 1.5 mmol/L above baseline (resting) values is considered (Berg et al., 1990; Zoladz et al., 1995). The lactate curve is usually fitted using a 3rd order polynomial regression curve, but the user can define another method (4th degree polynomial or B-spline).

Dmax

Dmax

The exercise intensity that yields the maximum perpendicular distance to the straight line between the first and the last data point (Cheng et al., 1992). The lactate curve is fitted using a 3rd order polynomial regression curve, and it can't be changed.

Modified Dmax (ModDmax)

The exercise intensity that yields the maximum perpendicular distance to the straight line between data point preceding the first rise in lactate greater than 0.4 mmol/L and the last data point (Bishop et al., 1998). The lactate curve is fitted using a 3rd order polynomial regression curve, and it can't be changed.

Exponential Dmax (Exp-Dmax)

The exercise intensity on the exponential plus-constant regression lactate curve that yields the maximum perpendicular distance to the straight line between the first and the last data point (Hughson et al., 1987). The lactate curve is fitted using an exponential curve, and it can't be changed.

Log-log modified Dmax (Log-Poly-ModDmax)

The exercise intensity that yields the maximum perpendicular distance to the straight line between Log-log and the last data point in the 3rd order polynomial regression curve (Jamnick et al., 2018). The lactate curve is fitted using a 3rd order polynomial regression curve, and it can't be changed.

Log-log exponential Dmax (Log-Exp-ModDmax)

The exercise intensity that yields the maximum perpendicular distance to the straight line between Log-log and the last data point in the exponential curve (Jamnick et al., 2018). The lactate curve is fitted using an exponential curve, and it can't be changed.

LTP

Lactate Turning Point 1 (LTP1) and Lactate Turning Point 2 (LTP2)

the lactate response is divided into three segments. A segmented regression is performed such that the lactate curve yields two breaking points. The first breaking point, representing the first rise in lactate above resting levels, is considered as LTP1. The second breaking point, representing an accelerated lactate accumulation, is then considered as LTP2 (Hofmann & Tschakert, 2017; Hofmann et al., 1997; Pokan et al., 1997). Caution: this method might require a double-check via a visual inspection, depending in some cases.

LTratio

The lactate response (i.e., ratio of lactate / exercise intensity vs exercise intensity) is interpolated using a B-spline regression curve. LTratio is then defined as the lowest value of the lactate / exercise intensity ratio, which attempts to describe the onset of the lactate increase (Dickhuth et al., 1999).

Value

a tibble with the following columns:

method_category

the category of the lactate threshold method.

method

the method used to estimate the lactate threshold

fitting

the fitting method used to predict the lactate curve

intensity

the intensity associated with the estimated lactate threshold

lactate

the lactate concentration associated with the estimated lactate threshold

heart_rate

the heart rate associated with the estimated lactate threshold

plot

the plot produced to display the lactate threshold

References

Beaver WL, Wasserman K, Whipp BJ. Improved detection of lactate threshold during exercise using a log-log transformation. Journal of Applied Physiology. 1985;59(6):1936–40.

Heck H, Mader A, Hess G, Mücke S, Müller R, Hollmann W. Justification of the 4-mmol/l Lactate Threshold. International Journal of Sports Medicine. 1985;06(03):117–30.

Kindermann W, Simon G, Keul J. The significance of the aerobic-anaerobic transition for the determination of work load intensities during endurance training. European Journal of Applied Physiology and Occupational Physiology. 1979;42(1):25–34.

Skinner JS, Mclellan TH. The Transition from Aerobic to Anaerobic Metabolism. Research Quarterly for Exercise and Sport. 1980;51(1):234–48.

Berg A, Jakob E, Lehmann M, Dickhuth HH, Huber G, Keul J. Current aspects of modern ergometry. Pneumologie. 1990;44(1):2–13.

Zoladz JA, Rademaker AC, Sargeant AJ. Non-linear relationship between O2 uptake and power output at high intensities of exercise in humans. The Journal of Physiology. 1995;488(1):211–7.

Cheng B, Kuipers H, Snyder A, Keizer H, Jeukendrup A, Hesselink M. A New Approach for the Determination of Ventilatory and Lactate Thresholds. International Journal of Sports Medicine. 1992;13(07):518–22.

Bishop D, Jenkins DG, Mackinnon LT. The relationship between plasma lactate parameters, Wpeak and 1-h cycling performance in women. Med Sci Sports Exerc. 1998;30(8):1270–5.

Hughson RL, Weisiger KH, Swanson GD. Blood lactate concentration increases as a continuous function in progressive exercise. Journal of Applied Physiology. 1987;62(5):1975–81.

Jamnick NA, Botella J, Pyne DB, Bishop DJ. Manipulating graded exercise test variables affects the validity of the lactate threshold and VO2peak. PLOS ONE. 2018;13(7):e0199794.

Hofmann P, Tschakert G. Intensity- and Duration-Based Options to Regulate Endurance Training. Front Physiol. 2017;8:337.

Hofmann P, Pokan R, von Duvillard SP, Seibert FJ, Zweiker R, Schmid P. Heart rate performance curve during incremental cycle ergometer exercise in healthy young male subjects. Med Sci Sports Exerc. 1997;29(6):762–8.

Pokan R, Hofmann P, Von Duvillard SP, et al. Left ventricular function in response to the transition from aerobic to anaerobic metabolism. Med Sci Sports Exerc. 1997;29(8):1040–7.

Dickhuth H-H, Yin L, Niess A, et al. Ventilatory, Lactate-Derived and Catecholamine Thresholds During Incremental Treadmill Running: Relationship and Reproducibility. International Journal of Sports Medicine. 1999;20(02):122–7.

Examples

## Not run: 
lactate_threshold(
  .data = demo_data,
  intensity_column = "intensity",
  lactate_column = "lactate",
  heart_rate_column = "heart_rate",
  fit = "3rd degree polynomial",
  include_baseline = TRUE,
  sport = "cycling",
  loglog_restrainer = 1,
  plot = TRUE
)

## End(Not run)

Bsln+

Description

It applies the ⁠Bsln+⁠ methods: ⁠Bsln+ 0.5 mmol/L⁠, ⁠Bsln+ 1.0 mmol/L⁠, and ⁠Bsln+ 1.5 mmol/L⁠.

Usage

method_bsln_plus(data_prepared, fit, sport, plot)

Arguments

data_prepared

The data retrieved from prepare_data().

fit

The fit you would like to use for finding the lactate values associated to each one of the lactate thresholds.

sport

The sport at which the incremental test was performed. One of cycling, running, or swimming.

plot

A boolean to indicate whether to generate a plot from each one of the methods.

Value

a tibble with the following columns:

method

the method used to estimate the lactate threshold

fitting

the fitting method used to predict the lactate curve

intensity

the intensity associated with the estimated lactate threshold

lactate

the lactate concentration associated with the estimated lactate threshold

heart_rate

the heart rate associated with the estimated lactate threshold

plot

the plot produced to display the lactate threshold


Dmax

Description

It applies the Dmax methods: "Dmax", "ModDmax", "Exp-Dmax", "Log-Poly-ModDmax", and "Log-Exp-ModDmax".

Usage

method_dmax(data_prepared, sport, loglog_restrainer = 1, plot)

Arguments

data_prepared

The data retrieved from prepare_data().

sport

The sport at which the incremental test was performed. One of cycling, running, or swimming.

loglog_restrainer

A scalar from 0 to 1 indicating the percentage of the data that you would like to restrain for fitting the Log-Log method - This is going to be used in the Log-Poly-ModDmax and Log-Exp-ModDmax methods only. For example, 1 means no restriction (fits using the whole data), and 0.5 means that only the first 50% of the data will be used. Default to 1.

plot

A boolean to indicate whether to generate a plot from each one of the methods.

Fit

The method_dmax() function does not have a fit argument because all the Dmax methods have their own default fitting methods:

  • Dmax = 3rd degree polynomial

  • ModDmax = 3rd degree polynomial

  • Exp-Dmax = exponential

  • Log-Poly-ModDmax = 3rd degree polynomial

  • Log-Exp-ModDmax = exponential

Value

a tibble with the following columns:

method

the method used to estimate the lactate threshold

fitting

the fitting method used to predict the lactate curve

intensity

the intensity associated with the estimated lactate threshold

lactate

the lactate concentration associated with the estimated lactate threshold

heart_rate

the heart rate associated with the estimated lactate threshold

plot

the plot produced to display the lactate threshold


Log-log

Description

It applies the Log-log method.

Usage

method_loglog(data_prepared, fit, sport, loglog_restrainer = 1, plot)

Arguments

data_prepared

The data retrieved from prepare_data().

fit

The fit you would like to use for finding the lactate values associated to each one of the lactate thresholds.

sport

The sport at which the incremental test was performed. One of cycling, running, or swimming.

loglog_restrainer

A scalar from 0 to 1 indicating the percentage of the data that you would like to restrain for fitting the Log-Log method. For example, 1 means no restriction (fits using the whole data), and 0.5 means that only the first 50% of the data will be used. Default to 1.

plot

A boolean to indicate whether to generate a plot from each one of the methods.

Value

a tibble with the following columns:

method

the method used to estimate the lactate threshold

fitting

the fitting method used to predict the lactate curve

intensity

the intensity associated with the estimated lactate threshold

lactate

the lactate concentration associated with the estimated lactate threshold

heart_rate

the heart rate associated with the estimated lactate threshold

plot

the plot produced to display the lactate threshold


Lactate Turning Point (LTP)

Description

It applies the LTP methods: LTP1, and LTP2.

Usage

method_ltp(data_prepared, fit, sport, plot)

Arguments

data_prepared

The data retrieved from prepare_data().

fit

The fit you would like to use for finding the lactate values associated to each one of the lactate thresholds.

sport

The sport at which the incremental test was performed. One of cycling, running, or swimming.

plot

A boolean to indicate whether to generate a plot from each one of the methods.

Value

a tibble with the following columns:

method

the method used to estimate the lactate threshold

fitting

the fitting method used to predict the lactate curve

intensity

the intensity associated with the estimated lactate threshold

lactate

the lactate concentration associated with the estimated lactate threshold

heart_rate

the heart rate associated with the estimated lactate threshold

plot

the plot produced to display the lactate threshold


Minimum Lactate-Intensity Ratio (LTratio)

Description

It applies the LTratio method.

Usage

method_ltratio(data_prepared, fit, sport, plot)

Arguments

data_prepared

The data retrieved from prepare_data().

fit

The fit you would like to use for finding the lactate values associated to each one of the lactate thresholds.

sport

The sport at which the incremental test was performed. One of cycling, running, or swimming.

plot

A boolean to indicate whether to generate a plot from each one of the methods.

Value

a tibble with the following columns:

method

the method used to estimate the lactate threshold

fitting

the fitting method used to predict the lactate curve

intensity

the intensity associated with the estimated lactate threshold

lactate

the lactate concentration associated with the estimated lactate threshold

heart_rate

the heart rate associated with the estimated lactate threshold

plot

the plot produced to display the lactate threshold


Onset of Blood Lactate Accumulation (OBLA)

Description

It applies the OBLA methods: ⁠OBLA 2.0 mmol/L⁠, ⁠OBLA 2.5 mmol/L⁠, ⁠OBLA 3.0 mmol/L⁠, ⁠OBLA 3.5 mmol/L⁠, and ⁠OBLA 4.0 mmol/L⁠.

Usage

method_obla(data_prepared, fit, sport, plot)

Arguments

data_prepared

The data retrieved from prepare_data().

fit

The fit you would like to use for finding the lactate values associated to each one of the lactate thresholds.

sport

The sport at which the incremental test was performed. One of cycling, running, or swimming.

plot

A boolean to indicate whether to generate a plot from each one of the methods.

Value

a tibble with the following columns:

method

the method used to estimate the lactate threshold

fitting

the fitting method used to predict the lactate curve

intensity

the intensity associated with the estimated lactate threshold

lactate

the lactate concentration associated with the estimated lactate threshold

heart_rate

the heart rate associated with the estimated lactate threshold

plot

the plot produced to display the lactate threshold


OBLA helper

Description

For internal use only and it won't be exported.

Usage

obla_helper(.data, data_augmented, fit, model, obla)

Arguments

.data

The raw data.

data_augmented

The augmented data from the model.

fit

The fit you would like to use for finding the lactate values associated to each one of the lactate thresholds.

model

The model chosen in fit,

obla

The lactate value to be analyzed.

Value

The results (intensity, lactate, heart rate) from the lactate threshold method.


Plot lactate

Description

Plots the lactate method. For internal use only.

Usage

plot_lactate(data_processed, method)

Arguments

data_processed

The processed data retrieve within one of the ⁠method_*⁠ functions.

method

The lactate threshold method.

Value

a ggplot2 object.


Combine lactate threshold methods into one plot

Description

Combine lactate threshold methods into one plot

Usage

plot_methods(plots, ...)

Arguments

plots

The ggplot2 objects to be combined.

...

Additional arguments passed onto patchwork::wrap_plots().

Value

a patchwork object


Prepare raw data

Description

It organizes and renames the raw data.

Usage

prepare_data(.data, intensity_column, lactate_column, heart_rate_column)

Arguments

.data

The raw data.

intensity_column

The name of the intensity column.

lactate_column

The name of the lactate column.

heart_rate_column

The name of the heart rate column, if applicable.

Value

a tibble with the following columns:

intensity

The intensity column.

lactate

The lactate column.

heart_rate

The heart rate column, if applicable.


Prepare fit

Description

This is an obligatory step before applying any lactate threshold method. This function will model the raw data as well as make all the necessary data wrangling.

Usage

prepare_fit(
  .data,
  fit = c("3rd degree polynomial", "4th degree polynomial", "B-spline", "Exponential"),
  include_baseline = FALSE,
  sport = c("cycling", "running", "swimming")
)

Arguments

.data

The data retrieved from prepare_data().

fit

The fit you would like to use for finding the lactate values associated to each one of the lactate thresholds. Please, note that a few lactate thresholds have default methods for this and cannot be changed. See Details.

include_baseline

A boolean to indicate whether to include the baseline value in the fit.

sport

The sport at which the incremental test was performed. One of cycling, running, or swimming.

Value

a tibble with the following nested columns:

data

The raw data.

data_interpolated

The interpolated data.

model

The model chosen in the fit parameter.

data_augmented

The augmented data retrieved from the model.

bsln

A boolean indicating the include_baseline argument.


Prepare modified Dmax fits

Description

This is a function for internal use only and it won't be exported.

Usage

prepare_fit_dmax_mods(
  .data,
  fit = c("3rd degree polynomial", "Exponential"),
  intensity_to_start,
  sport = c("cycling", "running", "swimming")
)

Arguments

.data

The data retrieved from prepare_data().

fit

The fit you would like to use for finding the lactate values associated to each one of the lactate thresholds. Please, note that a few lactate thresholds have default methods for this and cannot be changed. See Details.

intensity_to_start

A double indicating the intensity to start the fit.

sport

The sport at which the incremental test was performed. One of cycling, running, or swimming.

Value

a tibble with the following nested columns:

data

The raw data.

data_interpolated

The interpolated data.

model

The model chosen in the fit parameter.

data_augmented

The augmented data retrieved from the model.

bsln

A boolean indicating the include_baseline argument.


Retrieve heart rate

Description

Retrieves the heart rate associated to a given intensity value. It is mainly for internal use but it is exported for possible extensions.

Usage

retrieve_heart_rate(raw_data, intensity_value)

Arguments

raw_data

The raw data.

intensity_value

The intensity value.

Value

the heart rate associated with the estimated lactate threshold


Retrieve intensity

Description

Retrieves the intensity associated to a given lactate value. It is mainly for internal use but it is exported for possible extensions.

Usage

retrieve_intensity(data_augmented, fit, model, lactate_value)

Arguments

data_augmented

The augmented data from the model.

fit

The fit you would like to use for finding the lactate values associated to each one of the lactate thresholds.

model

The model chosen in fit.

lactate_value

The lactate value.

Value

the intensity associated with the estimated lactate threshold


Retrieve lactate

Description

Retrieves the lactate associated to a given intensity value. It is mainly for internal use but it is exported for possible extensions.

Usage

retrieve_lactate(model, intensity_value)

Arguments

model

The model chosen in fit.

intensity_value

The intensity value.

Value

the lactate associated with the estimated lactate threshold


Data input widget

Description

Widget to help with data input.

Usage

run_data_input(width = 1200, height = 900)

Arguments

width

The width, in pixels.

height

The height, in pixels.

Value

The code to reproduce the manual data input.

mirror server hosted at Truenetwork, Russian Federation.