Package 'trainingmodels'

Title: Mathematical Models of Training Load and Training Response
Description: Implements mathematical models used in sport science to describe training load and its relationship with training response, including descriptors of daily training load and impulse-response models.
Authors: Jorge del Rosario Fernández Santos [aut, cre, cph] (ORCID: <https://orcid.org/0000-0002-5047-2976>)
Maintainer: Jorge del Rosario Fernández Santos <[email protected]>
License: MIT + file LICENSE
Version: 0.0.4
Built: 2026-11-30 11:36:52 UTC
Source: https://github.com/JorgeDelro/trainingmodels

Help Index


Build a daily training-load series

Description

Converts a data frame with one row per training session (or per day) into a complete daily calendar with one row per athlete and day. This is the single entry point for every analysis in the package: descriptors and impulse-response models take a daily_load object.

Usage

as_daily_load(
  data,
  date,
  load,
  athlete = NULL,
  performance = NULL,
  gaps = c("rest", "missing"),
  max_gap = 7,
  date_format = NULL
)

Arguments

data

A data frame with one row per session (or per day).

date

Name of the date column. The column must be of class Date, or character to be parsed with date_format. A Date with a fraction of a day is floored to the day. Date-times (POSIXct) are rejected: convert them with as.Date() first, choosing the time zone.

load

Name of the load column: numeric, ⁠>= 0⁠ or NA. A column that is entirely NA (an empty column in a CSV file, read as logical) is accepted as numeric NA.

athlete

Name of the athlete identifier column, or NULL (the default) for a single athlete, who is labelled "1".

performance

Name of a numeric performance column, or NULL. At most one distinct non-NA value is allowed per athlete and day. An entirely NA column is accepted, as for load.

gaps

How to treat days with no row between an athlete's first and last date: "rest" (load 0, the default) or "missing" (load NA).

max_gap

A single non-negative whole number. A warning is given for each run of more than max_gap consecutive days without a row.

date_format

Format used to parse a character date column, as in strptime(). The default NULL accepts ISO dates ("%Y-%m-%d") only. Any parsed year before 1900 or after 2100 is an error, which catches two-digit years read with "%Y".

Value

An object of class c("daily_load", "data.frame") with one row per athlete and day, sorted by athlete and date, and the columns:

  • athlete (character);

  • date (Date), consecutive within each athlete;

  • load (numeric), the sum of the day's sessions;

  • status (factor with levels "training", "rest", "missing");

  • n_sessions (integer), the number of rows in data for that day, 0 for filled days;

  • filled (logical), TRUE for days that had no row;

  • performance (numeric), only if performance was given.

The attributes gaps and load_name record the gap option used and the name of the load column.

Day states

Every day has exactly one of three states (DECISIONS.md, D-015):

  • training: the load of the day is greater than 0;

  • rest: the load of the day is 0;

  • missing: the load of the day is not available (NA).

Sessions on the same day are summed. If any session of a day has an NA load, the whole day is NA and its state is "missing": a missing load is never silently replaced (D-016).

Gap rule

Each athlete's calendar runs from their own first to their own last date. Days in between that have no row are added and marked filled = TRUE. By default (gaps = "rest") they are treated as rest days with load 0; with gaps = "missing" they get load NA and state "missing" (D-015). The calendar ends at the athlete's last row: rest days after the last session are not added, so trailing rest days must be given as rows with load 0 to be included. A message reports how many days were filled. Whatever gaps is, a warning is given for every run of more than max_gap consecutive filled days, because a long run without data is as likely to be missing data as rest.

Several athletes and load columns

A data file may hold several athletes (identified by the column named in athlete) and several load columns; each call uses one load column (D-017). Its name is kept in the attribute load_name.

See Also

print.daily_load(), summary.daily_load().

Examples

sessions <- data.frame(
  athlete = c("A", "A", "A", "A", "B", "B"),
  date = c("2026-01-01", "2026-01-01", "2026-01-02", "2026-01-05",
           "2026-01-03", "2026-01-04"),
  srpe = c(300, 150, 0, NA, 420, 380),
  jump = c(41.2, NA, NA, 40.5, NA, 38.9)
)

x <- as_daily_load(sessions, date = "date", load = "srpe",
                   athlete = "athlete", performance = "jump")
x
summary(x)

# Days without a row treated as missing instead of rest
as_daily_load(sessions, date = "date", load = "srpe",
              athlete = "athlete", gaps = "missing")

Response to constant daily training

Description

Computes fitness, fatigue and predicted performance when the same load is done every day from day 1, with the closed forms of Morton et al. (1990, Eqs. 6, 9-11), the asymptote of predicted performance and the day of poorest performance (MODELS.md, M-04). Nothing is fitted: the parameters are given by the user. The initial state is 0.

Usage

constant_training(
  load,
  k1,
  tau1,
  k2 = NULL,
  tau2 = NULL,
  p0 = 0,
  model = c("two_component", "fitness_only"),
  days = 100,
  same_day_load = c("exclude", "include")
)

Arguments

load

Daily training load, a single finite number ⁠> 0⁠, done every day from day 1.

k1

Gain of fitness, a single finite number ⁠>= 0⁠.

tau1

Time constant of fitness in days, a single finite number ⁠> 0⁠. Arguments are time constants, never half-lives (D-024): see time_constant() to convert a half-life.

k2

Gain of fatigue, a single finite number ⁠>= 0⁠. Required for the two-component model; must not be given for the fitness-only model.

tau2

Time constant of fatigue in days, a single finite number ⁠> 0⁠. Required for the two-component model; must not be given for the fitness-only model.

p0

Baseline performance, a single finite number.

model

"two_component" (the default; fitness and fatigue) or "fitness_only" (D-023).

days

Last day of the curve, a single whole number ⁠>= 1⁠.

same_day_load

Timing convention: "exclude" (the default) or "include". See the section on the timing convention.

Value

A list of class "constant_training" with the elements

  • curve: a data frame with the columns day (1 to days), fitness, fatigue (NA for the fitness-only model) and predicted;

  • asymptote: predicted performance as days grow;

  • time_of_minimum: day of poorest performance, or NA;

  • load, model, same_day_load, days and parameters: the arguments used.

Formula

For a daily load TT and the time constant τ\tau of either component,

ginc(t)=T 1−e−t/τ1−e−1/τ,gexc(t)=T e−1/τ 1−e−(t−1)/τ1−e−1/τg_{inc}(t) = T\,\frac{1 - e^{-t/\tau}}{1 - e^{-1/\tau}}, \qquad g_{exc}(t) = T\,e^{-1/\tau}\,\frac{1 - e^{-(t-1)/\tau}}{1 - e^{-1/\tau}}

under same_day_load = "include" and "exclude" (the default, D-012). These equal simulate_banister() on a series of constant load.

Asymptote

The asymptote is the predicted performance as days grow. It depends on the convention: since gexc(t)=ginc(t)−Tg_{exc}(t) = g_{inc}(t) - T, the "exclude" asymptote is the "include" one minus (k1−k2) T(k_1 - k_2)\,T:

pinc(∞)=p0+k1T1−e−1/τ1−k2T1−e−1/τ2,pexc(∞)=p0+k1Te−1/τ11−e−1/τ1−k2Te−1/τ21−e−1/τ2.p_{inc}(\infty) = p_0 + \frac{k_1 T}{1 - e^{-1/\tau_1}} - \frac{k_2 T}{1 - e^{-1/\tau_2}}, \qquad p_{exc}(\infty) = p_0 + \frac{k_1 T e^{-1/\tau_1}}{1 - e^{-1/\tau_1}} - \frac{k_2 T e^{-1/\tau_2}}{1 - e^{-1/\tau_2}}.

Time of minimum

The day of poorest performance (Morton et al. 1990, Eq. 10; their tnt_n, named in words here, D-026) is

time_of_minimum=τ1τ2τ1−τ2ln⁡τ1k2(1−e−1/τ1)τ2k1(1−e−1/τ2),\mathrm{time\_of\_minimum} = \frac{\tau_1 \tau_2}{\tau_1 - \tau_2} \ln\frac{\tau_1 k_2 (1 - e^{-1/\tau_1})}{\tau_2 k_1 (1 - e^{-1/\tau_2})},

the same under both conventions. It is a continuous time: the day with the lowest predicted value in curve is the nearest whole day.

time_of_minimum is NA when there is no minimum: when τ1≤τ2\tau_1 \le \tau_2, when the argument of the logarithm is ≤1\le 1 (fatigue is too small for performance to dip), when k1=0k_1 = 0 (performance only falls), and for the fitness-only model (performance only rises).

References

Morton RH, Fitz-Clarke JR, Banister EW (1990). Modeling human performance in running. Journal of Applied Physiology, 69(3), 1171-1177.

See Also

simulate_banister(), session_response(), half_life().

Examples

# Morton et al. (1990): load 100 every day
constant_training(100, k1 = 1, tau1 = 45, k2 = 2, tau2 = 15,
                  same_day_load = "include")

Convert between time constants and half-lives

Description

half_life() gives the number of days for a component to fall to half, τln⁡2\tau \ln 2, and time_constant() gives the time constant τ\tau of a half-life (MODELS.md, Notation).

Usage

half_life(tau)

time_constant(half_life)

Arguments

tau

Time constants in days: a numeric vector of positive finite numbers.

half_life

Half-lives in days: a numeric vector of positive finite numbers.

Details

Impulse-response functions take time constants, never half-lives; print methods show the half-life next to each time constant (DECISIONS.md, D-024).

Value

A numeric vector of the same length.

See Also

simulate_banister(), session_response().

Examples

half_life(c(45, 15))
time_constant(7)

Training monotony and strain

Description

Computes Foster's (1998) training monotony and strain for every day, over a rolling window of window days (7 by default), within each athlete (MODELS.md, M-12).

Usage

monotony_strain(x, window = 7, same_day_load = c("include", "exclude"))

Arguments

x

A daily_load object, from as_daily_load(). It is checked first; an object changed after it was built (for example by subsetting) must be rebuilt with as_daily_load().

window

Length of the window in days, a single whole number ⁠>= 2⁠.

same_day_load

Whether the window ends on the current day ("include", the default) or on the previous day ("exclude").

Value

A data frame with one row per row of x, in the same order, and the columns athlete, date, load, window_load, mean_load, sd_load, monotony and strain. The attributes window and same_day_load record the arguments used.

Formula

For the loads of the window,

monotony=mean loadSD of the loads,strain=window load×monotony,\mathrm{monotony} = \frac{\mathrm{mean\ load}}{\mathrm{SD\ of\ the\ loads}}, \qquad \mathrm{strain} = \mathrm{window\ load} \times \mathrm{monotony},

where the window load is the sum of the loads and the SD is the sample standard deviation (divisor k−1k - 1). Foster (1998) defines them over a week; the package uses a rolling window computed every day (D-022). The window is the one of rolling_load() (MODELS.md, M-11).

Timing option and default

With same_day_load = "include" (the default) the window ends on the current day; with "exclude" it ends on the previous day. The default differs from the impulse-response models, whose default is "exclude" (DECISIONS.md, D-021 and D-012).

Missing, rest and equal days

  • A day with a missing load makes every window that contains it NA in every result column (D-016). Windows that do not fit in the series are NA: there are no partial windows.

  • Rest days count as load 0. Foster (1998) does not say how rest days are treated; the result depends on this choice.

  • When all loads of the window are equal (for example seven rest days), sd_load is 0 and monotony and strain are NA (D-022). Equality is tested on the loads themselves, not on the computed standard deviation.

Monotony divides by a standard deviation, so it is unstable when the days of the window are similar. The article "Monotony and strain" on the package website discusses its limitations.

Acute

chronic workload ratio: Ratios of rolling loads and EWMA-based loads are not provided here: see the ACWR package (DECISIONS.md, D-019).

References

Foster C (1998). Monitoring training in athletes with reference to overtraining syndrome. Medicine and Science in Sports and Exercise, 30(7), 1164-1168.

See Also

rolling_load(), srpe_load(), as_daily_load().

Examples

# The week of Foster (1998), Table 1
week <- data.frame(
  date = as.Date("2026-01-04") + 0:6,
  load = srpe_load(rpe = c(5, 7, 2, 6, 7, 2, 7),
                   duration = c(180, 120, 20, 90, 75, 20, 120))
)
x <- as_daily_load(week, date = "date", load = "load")
monotony_strain(x)

Print a daily training-load series

Description

Prints a header (number of athletes, date range, number of days, counts by day state and number of filled days) followed by the first rows.

Usage

## S3 method for class 'daily_load'
print(x, n = 10, ...)

Arguments

x

A daily_load object, from as_daily_load().

n

Number of rows to show.

...

Passed to print.data.frame().

Value

x, invisibly.

Examples

x <- as_daily_load(
  data.frame(date = c("2026-01-01", "2026-01-03"), load = c(300, 250)),
  date = "date", load = "load"
)
print(x)

Print a Banister simulation

Description

Prints a header with the model, the timing convention, the parameters and the half-life of each time constant (DECISIONS.md, A-012 and D-024), followed by the first rows of the simulation.

Usage

## S3 method for class 'session_response'
print(x, ...)

## S3 method for class 'constant_training'
print(x, ...)

## S3 method for class 'banister_sim'
print(x, n = 10, ...)

Arguments

x

A banister_sim object, from simulate_banister().

...

Passed to print.data.frame().

n

Number of rows to print.

Value

x, invisibly.

Examples

x <- as_daily_load(
  data.frame(date = as.Date("2026-01-01") + 0:9, load = rep(100, 10)),
  date = "date", load = "load"
)
print(simulate_banister(x, k1 = 1, tau1 = 45, k2 = 2, tau2 = 15), n = 5)

Rolling training load

Description

Computes, for every day, the sum and the mean of the daily loads over a window of window days, within each athlete (MODELS.md, M-11).

Usage

rolling_load(x, window = 7, same_day_load = c("include", "exclude"))

Arguments

x

A daily_load object, from as_daily_load(). It is checked first; an object changed after it was built (for example by subsetting) must be rebuilt with as_daily_load().

window

Length of the window in days, a single whole number ⁠>= 1⁠.

same_day_load

Whether the window ends on the current day ("include", the default) or on the previous day ("exclude").

Value

A data frame with one row per row of x, in the same order, and the columns athlete, date, load, rolling_sum and rolling_mean. The attributes window and same_day_load record the arguments used.

Formula

For the daily loads w(1),…,w(T)w(1), \dots, w(T) of one athlete and a window of kk days:

  • same_day_load = "include" (the default): the window ends on the current day,

    S(t)=∑j=t−k+1tw(j),S(t) = \sum_{j = t-k+1}^{t} w(j),

    defined for t≥kt \ge k;

  • same_day_load = "exclude": the window ends on the previous day,

    S(t)=∑j=t−kt−1w(j),S(t) = \sum_{j = t-k}^{t-1} w(j),

    defined for t≥k+1t \ge k + 1. This is the form of Carey et al. (2017, Eq. 1).

The rolling mean is S(t)/kS(t) / k. The two options are related by "exclude" on day tt = "include" on day t−1t - 1.

Timing option and default

The default is same_day_load = "include" (DECISIONS.md, D-021). This differs from the impulse-response models, whose default is "exclude" (D-012).

Missing and rest days

A day with a missing load makes every window that contains it NA (D-016); missing loads are never filled. Windows that do not fit in the series (the first k−1k - 1 days with "include", the first kk with "exclude") are NA: there are no partial windows. Rest days count as load 0. Days added by as_daily_load() count as rest or as missing according to its gaps argument.

Acute

chronic workload ratio: Ratios of rolling loads and EWMA-based loads are not provided here: see the ACWR package (DECISIONS.md, D-019).

References

Carey DL, Blanch P, Ong K-L, et al. (2017). Training loads and injury risk in Australian football—differing acute:chronic workload ratios influence match injury risk. British Journal of Sports Medicine, 51, 1215-1220.

See Also

monotony_strain(), srpe_load(), as_daily_load().

Examples

x <- as_daily_load(
  data.frame(date = as.Date("2026-01-01") + 0:9,
             load = c(300, 0, 450, 500, 0, 0, 620, 410, 380, 0)),
  date = "date", load = "load"
)
rolling_load(x, window = 3)
rolling_load(x, window = 3, same_day_load = "exclude")

Run the teaching app

Description

Opens the teaching app of the package in a browser: one screen, "Response to a single session", with sliders for the parameters of the Banister model and the curve, time_to_recover and time_to_peak given by session_response(). The same app is published as a static site that runs in the browser without R, at https://jorgedelro.github.io/trainingmodels/app/ (DECISIONS.md, D-031).

Usage

run_app(...)

Arguments

...

Arguments passed to shiny::runApp(), such as port or launch.browser.

Details

The app needs the shiny package, which is suggested but not required by trainingmodels.

Value

Called for its side effect; returns when the app is stopped.

See Also

session_response() and the article "The Banister model".

Examples

if (interactive() && requireNamespace("shiny", quietly = TRUE)) {
  run_app()
}

Response to a single training session

Description

Computes the effect on predicted performance of one unit of load on the days after a single session (the influence curve), the time until that effect becomes positive and the time until it is largest (MODELS.md, M-05). Nothing is fitted: the parameters are given by the user.

Usage

session_response(
  k1,
  tau1,
  k2 = NULL,
  tau2 = NULL,
  model = c("two_component", "fitness_only"),
  days = 60,
  same_day_load = c("exclude", "include")
)

Arguments

k1

Gain of fitness, a single finite number ⁠>= 0⁠.

tau1

Time constant of fitness in days, a single finite number ⁠> 0⁠. Arguments are time constants, never half-lives (D-024): see time_constant() to convert a half-life.

k2

Gain of fatigue, a single finite number ⁠>= 0⁠. Required for the two-component model; must not be given for the fitness-only model.

tau2

Time constant of fatigue in days, a single finite number ⁠> 0⁠. Required for the two-component model; must not be given for the fitness-only model.

model

"two_component" (the default; fitness and fatigue) or "fitness_only" (D-023).

days

Last day of the curve, a single whole number ⁠>= 1⁠. The curve runs from day 0 (the day of the session) to days.

same_day_load

Timing convention: "exclude" (the default) or "include". See the section on the timing convention.

Value

A list of class "session_response" with the elements

  • curve: a data frame with the columns day (0 to days) and effect (effect on predicted performance per unit of load);

  • time_to_recover, time_to_peak (days) and peak_effect (per unit of load), each a number or NA;

  • model, same_day_load, days and parameters: the arguments used.

Formula

The effect uu days after one unit of load is

L(u)=k1 e−u/τ1−k2 e−u/τ2L(u) = k_1\,e^{-u/\tau_1} - k_2\,e^{-u/\tau_2}

for the two-component model, and k1 e−u/τ1k_1\,e^{-u/\tau_1} for the fitness-only model. For τ1>τ2\tau_1 > \tau_2,

time_to_recover=τ1τ2τ1−τ2ln⁡k2k1,time_to_peak=τ1τ2τ1−τ2ln⁡k2τ1k1τ2,\mathrm{time\_to\_recover} = \frac{\tau_1 \tau_2}{\tau_1 - \tau_2} \ln\frac{k_2}{k_1}, \qquad \mathrm{time\_to\_peak} = \frac{\tau_1 \tau_2}{\tau_1 - \tau_2} \ln\frac{k_2 \tau_1}{k_1 \tau_2},

and peak_effect is LL at time_to_peak. These are tnt_n and tgt_g of Clarke & Skiba (2013) and Busso & Chalencon (2023); they are named in words because Morton et al. (1990) use tnt_n for a different quantity, the time_of_minimum of constant_training() (DECISIONS.md, D-026).

Timing convention

The times do not depend on the convention. Only the effect on the day of the session (day 0 of curve) does: k1−k2k_1 - k_2 with same_day_load = "include", 0 with "exclude" (the default, D-012). From day 1 on, both conventions give L(u)L(u).

When the times are NA

The times are NA when they do not exist (D-026):

  • time_to_recover is NA when k2≤k1k_2 \le k_1: the effect is positive from the first day after the session, so there is nothing to recover from.

  • time_to_peak and peak_effect are NA when k2τ1≤k1τ2k_2 \tau_1 \le k_1 \tau_2: the effect is largest right after the session and only decreases.

  • Both are NA when k1=0k_1 = 0 (the effect is never positive), when τ1≤τ2\tau_1 \le \tau_2 (fatigue does not fade faster than fitness), and for the fitness-only model (there is no fatigue).

References

Clarke DC, Skiba PF (2013). Rationale and resources for teaching the mathematical modeling of athletic training and performance. Advances in Physiology Education, 37, 134-152.

Busso T, Chalencon S (2023). Validity and accuracy of impulse-response models for modeling and predicting training effects on performance of swimmers. Medicine & Science in Sports & Exercise, 55(7), 1274-1285.

Ceddia D, Bondell H, Taylor P (2025). Mathematical modelling and optimisation of athletic performance: tapering and periodisation. arXiv:2505.20859 (preprint).

See Also

simulate_banister(), constant_training(), half_life().

Examples

# Parameters of Morton et al. (1990)
r <- session_response(k1 = 1, tau1 = 45, k2 = 2, tau2 = 15)
r
head(r$curve)

# Fit of Clarke & Skiba (2013)
session_response(k1 = 0.18258, tau1 = 35.821, k2 = 0.23016, tau2 = 21.340)

Simulate the Banister impulse-response model

Description

Computes fitness, fatigue and predicted performance for every day of a daily training-load series, within each athlete, from parameters given by the user (MODELS.md, M-01 to M-03). Nothing is fitted: this version only simulates.

Usage

simulate_banister(
  x,
  k1,
  tau1,
  k2 = NULL,
  tau2 = NULL,
  p0 = 0,
  model = c("two_component", "fitness_only"),
  same_day_load = c("exclude", "include"),
  initial_fitness = 0,
  initial_fatigue = 0,
  missing_load = c("error", "zero")
)

Arguments

x

A daily_load object, from as_daily_load(). It is checked first; an object changed after it was built (for example by subsetting) must be rebuilt with as_daily_load().

k1

Gain of fitness, a single finite number ⁠>= 0⁠.

tau1

Time constant of fitness in days, a single finite number ⁠> 0⁠. Arguments are time constants, never half-lives (D-024): see time_constant() to convert a half-life.

k2

Gain of fatigue, a single finite number ⁠>= 0⁠. Required for the two-component model; must not be given for the fitness-only model.

tau2

Time constant of fatigue in days, a single finite number ⁠> 0⁠. Required for the two-component model; must not be given for the fitness-only model.

p0

Baseline performance, a single finite number.

model

"two_component" (the default; fitness and fatigue) or "fitness_only" (D-023).

same_day_load

Timing convention: "exclude" (the default) or "include". See the section on the timing convention.

initial_fitness, initial_fatigue

Fitness and fatigue on day 0, single finite numbers ⁠>= 0⁠. The fitness-only model has no fatigue, so initial_fatigue must be 0.

missing_load

What to do with missing loads: "error" (the default) or "zero" to count them as load 0.

Value

An object of class c("banister_sim", "data.frame") with one row per row of x, in the same order, and the columns athlete, date, load, fitness, fatigue (NA for the fitness-only model), predicted and, if x has a performance column, observed. The attributes model, same_day_load, parameters (named numeric vector) and initial_state record the arguments used. Its print method shows them, with the half-life of each time constant.

Formula

Fitness gg and fatigue hh are exponential filters of the daily load ww with time constants τ1\tau_1 and τ2\tau_2 (MODELS.md, M-01). The two-component model (M-02) predicts

p(t)=p0+k1 g(t)−k2 h(t),p(t) = p_0 + k_1\,g(t) - k_2\,h(t),

and the fitness-only model (M-03) predicts

p(t)=p0+k1 g(t).p(t) = p_0 + k_1\,g(t).

The columns fitness and fatigue are gg and hh without their gains. They are computed in recursive form.

Timing convention and default

  • same_day_load = "exclude" (the default; Busso & Chalencon 2023): the load of day tt affects performance from day t+1t + 1,

    g(t)=[g(t−1)+w(t−1)] e−1/τ.g(t) = [g(t-1) + w(t-1)]\,e^{-1/\tau}.

    This corresponds to a performance test done before that day's training.

  • same_day_load = "include" (Morton et al. 1990, Eqs. 4-5): the load of day tt counts on day tt at full weight,

    g(t)=g(t−1) e−1/τ+w(t).g(t) = g(t-1)\,e^{-1/\tau} + w(t).

The two conventions give different numbers: gains obtained under one are not comparable with the other. The default "exclude" (DECISIONS.md, D-012) differs from the default of the load descriptors such as rolling_load(), which is "include" (D-021).

Initial state

Fitness and fatigue start from initial_fitness and initial_fatigue on day 0, both 0 by default (D-025). An initial value g0g_0 adds g0 e−t/τg_0\,e^{-t/\tau} to day tt under both conventions (MODELS.md, M-01). Each athlete starts from the same initial state on their first day.

Missing loads

Missing loads are never replaced silently (D-016). By default a series with a missing load is an error that names the first missing day. With missing_load = "zero" missing loads count as load 0 and a message says how many; the load column of the result still shows them as NA.

References

Morton RH, Fitz-Clarke JR, Banister EW (1990). Modeling human performance in running. Journal of Applied Physiology, 69(3), 1171-1177.

Busso T, Chalencon S (2023). Validity and accuracy of impulse-response models for modeling and predicting training effects on performance of swimmers. Medicine & Science in Sports & Exercise, 55(7), 1274-1285.

Marchal A, Benazieb O, Weldegebriel Y, Méline T, Imbach F (2025). Statistical flaws of the fitness-fatigue sports performance prediction model. Scientific Reports, 15, 3706.

See Also

session_response() for the response to a single session, constant_training() for constant daily training, half_life(), as_daily_load(). The article "The Banister model" on the package website discusses the limitations of the model.

Examples

# Morton et al. (1990): load 100 on days 1-60, then 60 days of rest
x <- as_daily_load(
  data.frame(date = as.Date("2026-01-01") + 0:119,
             load = c(rep(100, 60), rep(0, 60))),
  date = "date", load = "load"
)
sim <- simulate_banister(x, k1 = 1, tau1 = 45, k2 = 2, tau2 = 15,
                         same_day_load = "include")
sim
which.min(sim$predicted)

# Fitness-only model, default convention "exclude"
simulate_banister(x, k1 = 1, tau1 = 45, model = "fitness_only")

Session RPE load

Description

Computes the session rating of perceived exertion (RPE) load of Foster (1998) and Foster et al. (2001): the RPE of the session multiplied by its duration in minutes (MODELS.md, M-10).

Usage

srpe_load(rpe, duration)

Arguments

rpe

Numeric vector of session RPE values, each between 0 and 10 or NA.

duration

Numeric vector of session durations in minutes, each ⁠>= 0⁠ or NA. Must have the same length as rpe, or one of the two must have length 1.

Details

w=RPE×Dw = \mathrm{RPE} \times D

Value

A numeric vector, rpe * duration. NA in either argument gives NA.

Collecting the data

  • RPE is rated on the 0-10 category-ratio scale: one global rating for the whole session, asked about 30 minutes after it ends.

  • Duration is the duration in minutes of the entire session, including warm-up, cool-down and recovery intervals.

Several sessions on the same day are summed when the loads are passed to as_daily_load().

Session RPE load is in arbitrary units. Comparing it across athletes needs care.

References

Foster C (1998). Monitoring training in athletes with reference to overtraining syndrome. Medicine and Science in Sports and Exercise, 30(7), 1164-1168.

Foster C, Florhaug JA, Franklin J, et al. (2001). A new approach to monitoring exercise training. Journal of Strength and Conditioning Research, 15(1), 109-115.

See Also

as_daily_load() to build the daily series, rolling_load() and monotony_strain() to describe it.

Examples

# The week of Foster (1998), Table 1
srpe_load(rpe = c(5, 7, 2, 6, 7, 2, 7),
          duration = c(180, 120, 20, 90, 75, 20, 120))

Summarise a daily training-load series by athlete

Description

Summarise a daily training-load series by athlete

Usage

## S3 method for class 'daily_load'
summary(object, ...)

Arguments

object

A daily_load object, from as_daily_load().

...

Not used.

Value

A data frame with one row per athlete and the columns athlete, first_date, last_date, n_days, n_training, n_rest, n_missing, n_filled, longest_filled_run (the longest run of consecutive filled days) and n_performance (days with a non-NA performance value; 0 if there is no performance column).

Examples

x <- as_daily_load(
  data.frame(date = c("2026-01-01", "2026-01-03"), load = c(300, 250)),
  date = "date", load = "load"
)
summary(x)