Package {ACWR}


Type: Package
Title: Acute Chronic Workload Ratio Calculation
Version: 0.2.0
Maintainer: Jorge R Fernandez-Santos <jorgedelrosario.fernandez@uca.es>
Description: Functions for calculating the acute chronic workload ratio using three different methods: exponentially weighted moving average (EWMA), rolling average coupled (RAC) and rolling averaged uncoupled (RAU). Sessions are placed on a daily calendar, so rest days count as zero load. Examples of these methods can be found in Williams et al. (2017) <doi:10.1136/bjsports-2016-096589> for EWMA and Windt & Gabbett (2019) <doi:10.1136/bjsports-2017-098925> for RAC and RAU.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Imports: r2d3
Depends: R (≥ 2.10)
RoxygenNote: 7.3.3
URL: https://jorgedelro.github.io/ACWR/, https://github.com/JorgeDelro/ACWR
BugReports: https://github.com/JorgeDelro/ACWR/issues
Suggests: knitr, rmarkdown, testthat (≥ 3.0.0)
Config/testthat/edition: 3
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2026-11-17 08:38:35 UTC; jorge
Author: Jorge R Fernandez-Santos ORCID iD [aut, cre]
Repository: CRAN
Date/Publication: 2026-11-17 10:30:18 UTC

Acute Chronic Workload Ratio

Description

Calculates the acute chronic workload ratio for one or several athletes with one or more methods (see EWMA(), RAC() and RAU()).

Usage

ACWR(
  db,
  ID,
  TL,
  weeks = NULL,
  days = NULL,
  training_dates,
  ACWR_method = c("EWMA", "RAC", "RAU"),
  partial = FALSE
)

Arguments

db

a data frame with one row per session.

ID

name of the column with the ID of the subjects.

TL

name of the column with the training load (numeric, >= 0).

weeks

deprecated and ignored in the calculation. If given, the column is kept in the output.

days

deprecated and ignored in the calculation. If given, the column is kept in the output (e.g. for plot_ACWR()).

training_dates

name of the column with the training dates (Date or POSIXct). Rows do not need to be sorted.

ACWR_method

method(s) to calculate ACWR: any of "EWMA", "RAC" and "RAU".

partial

passed to RAC() and RAU(). If FALSE (default), values are NA until enough history exists; if TRUE, the days available are used.

Details

Each athlete's sessions are turned into a daily series from their first to their last date: sessions on the same day are summed and days without a session count as a load of 0.

A missing load (NA) makes every window that contains its day NA, and a single warning is given for the whole data frame.

Value

a data frame with the ID, TL, weeks, days and training dates columns, followed by the acute & chronic training load and ACWR of the selected method/s. Rows are in the same order as in db.

Package decisions

The following choices are made by this package; they are not taken from the cited sources:

EWMA is updated every calendar day, as defined by Williams et al. (2017); this is not a package interpretation.

Examples

data("training_load", package = "ACWR")

# Calculate ACWR
result_ACWR <- ACWR(db = training_load,
                    ID = "ID",
                    TL = "TL",
                    training_dates = "Training_Date",
                    ACWR_method = c("EWMA", "RAC", "RAU"))

# Athletes with rest days
data("training_load_rest", package = "ACWR")
result_rest <- ACWR(db = training_load_rest,
                    ID = "ID",
                    TL = "TL",
                    training_dates = "Training_Date",
                    ACWR_method = c("EWMA", "RAC", "RAU"))


Exponentially Weighted Moving Average

Description

Calculates the acute chronic workload ratio with exponentially weighted moving averages (Williams et al., 2017).

Usage

EWMA(TL, training_dates = NULL)

Arguments

TL

training load of each session (numeric, >= 0).

training_dates

date of each session (Date or POSIXct). Sessions do not need to be sorted. If NULL (default), sessions are assumed to be on consecutive days, in the order given, and a message is shown.

Details

Sessions are first turned into a daily series from the first to the last date: sessions on the same day are summed and days without a session count as a load of 0. Then, for every calendar day t with daily load w_t:

E_t = w_t \lambda + (1 - \lambda) E_{t-1}, \quad \lambda = 2 / (N + 1)

with N = 7 (acute) and N = 28 (chronic), and E_1 = w_1. Acute and chronic loads are on the scale of a daily load. Each session gets the value of its day. Values are not rounded.

EWMA is recursive: a missing load (NA) makes that day and every later day NA. A warning is given; impute missing loads before calling the function.

Value

A list with one value per session, in the input order:

Package decisions

The following choices are made by this package; they are not taken from the cited sources:

Updating the EWMA every calendar day, including rest days, follows the definition of Williams et al. (2017) and is not a package interpretation.

References

Williams S, West S, Cross MJ, Stokes KA (2017). Better way to determine the acute:chronic workload ratio? British Journal of Sports Medicine, 51(3), 209-210. doi:10.1136/bjsports-2016-096589

Examples

data("training_load", package = "ACWR")

# Select the first subject
training_load_1 <- training_load[training_load[["ID"]] == 1, ]

# Calculate ACWR
result_EWMA <- EWMA(TL = training_load_1$TL,
                    training_dates = training_load_1$Training_Date)


Rolling Average Coupled

Description

Calculates the acute chronic workload ratio with rolling averages, where the acute week is included in the chronic period (coupled ratio).

Usage

RAC(TL, weeks = NULL, training_dates, partial = FALSE)

Arguments

TL

training load of each session (numeric, >= 0).

weeks

deprecated and ignored. Kept for backwards compatibility; the calculation now uses training_dates only.

training_dates

date of each session (Date or POSIXct). Sessions do not need to be sorted.

partial

if FALSE (default), acute values are NA until 7 days of history exist, and chronic values and ACWR until 28 days exist. If TRUE, the days available are used and expressed per 7 days.

Details

Sessions are first turned into a daily series from the first to the last date: sessions on the same day are summed and days without a session count as a load of 0. Then, for each day t:

Each session gets the value of its day. Values are not rounded.

A missing load (NA) makes every window that contains its day NA, and a warning is given.

Value

A list with one value per session, in the input order:

Package decisions

The following choices are made by this package; they are not taken from the cited sources:

References

Windt J, Gabbett TJ (2019). Is it all for naught? What does mathematical coupling mean for acute:chronic workload ratios? British Journal of Sports Medicine, 53(16), 988-990. doi:10.1136/bjsports-2017-098925

Examples

data("training_load", package = "ACWR")

# Select the first subject
training_load_1 <- training_load[training_load[["ID"]] == 1, ]

# Calculate ACWR
result_RAC <- RAC(TL = training_load_1$TL,
                  training_dates = training_load_1$Training_Date)


Rolling Average Uncoupled

Description

Calculates the acute chronic workload ratio with rolling averages, where the acute week is excluded from the chronic period (uncoupled ratio).

Usage

RAU(TL, weeks = NULL, training_dates, partial = FALSE)

Arguments

TL

training load of each session (numeric, >= 0).

weeks

deprecated and ignored. Kept for backwards compatibility; the calculation now uses training_dates only.

training_dates

date of each session (Date or POSIXct). Sessions do not need to be sorted.

partial

if FALSE (default), acute values are NA until 7 days of history exist, and chronic values and ACWR until 28 days exist. If TRUE, the days available are used and expressed per 7 days.

Details

Sessions are first turned into a daily series from the first to the last date: sessions on the same day are summed and days without a session count as a load of 0. Then, for each day t:

Each session gets the value of its day. Values are not rounded.

A missing load (NA) makes every window that contains its day NA, and a warning is given.

Value

A list with one value per session, in the input order:

Package decisions

The following choices are made by this package; they are not taken from the cited sources:

References

Windt J, Gabbett TJ (2019). Is it all for naught? What does mathematical coupling mean for acute:chronic workload ratios? British Journal of Sports Medicine, 53(16), 988-990. doi:10.1136/bjsports-2017-098925

Examples

data("training_load", package = "ACWR")

# Select the first subject
training_load_1 <- training_load[training_load[["ID"]] == 1, ]

# Calculate ACWR
result_RAU <- RAU(TL = training_load_1$TL,
                  training_dates = training_load_1$Training_Date)


ACWR plots using d3.js

Description

ACWR plots using d3.js

Usage

plot_ACWR(
  db,
  TL,
  ACWR,
  day,
  ID = NULL,
  colour = NULL,
  xLabel = NULL,
  y0Label = NULL,
  y1Label = NULL,
  plotTitle = NULL
)

Arguments

db

a data frame

TL

training load

ACWR

Acute Chronic Workload Ratio

day

training days: day numbers (whole numbers) or dates (Date or POSIXct). The x-axis is a continuous calendar from the first to the last day.

ID

ID of the subjects

colour

colour of the bars. By default "#87CEEB" (skyblue)

xLabel

x-axis label. By default "Days"

y0Label

left y-axis label. By default "Load [AU]"

y1Label

right y-axis label. By default "Acute:chronic workload ratio"

plotTitle

Title of the plot. By default "ACWR"

Value

This function returns a d3.js object for a single subject. For several subjects it returns a list of d3.js objects. The x-axis has one slot per calendar day between the first and the last day, labelled every 7 days; days without a session have a bar of height 0. Sessions on the same day are shown as one bar (summed load). The ACWR line joins the sessions that have a value, across rest days, and is not drawn where the ACWR is NA.

Examples

data("training_load", package = "ACWR")

# Calculate ACWR
result_ACWR <- ACWR(db = training_load,
                    ID = "ID",
                    TL = "TL",
                    days = "Day",
                    training_dates = "Training_Date",
                    ACWR_method = c("EWMA", "RAC", "RAU"))

# Plot for 1 subject
# Select the first subject
result_ACWR_1 <- result_ACWR[result_ACWR[["ID"]] == 1, ]

# plot ACWR (e.g. EWMA)
ACWR_plot_1 <- plot_ACWR(db = result_ACWR_1,
                         TL = "TL",
                         ACWR = "EWMA_ACWR",
                         day = "Day")

# Plot for several subjects
# plot ACWR (e.g. RAC)
ACWR_plot <- plot_ACWR(db = result_ACWR,
                       TL = "TL",
                       ACWR = "RAC_ACWR",
                       day = "Day",
                       ID = "ID")


Training load dataframe

Description

A dataframe with the training load of 3 subjects.

Usage

data("training_load", package = "ACWR")

Format

An object of class tbl_df (inherits from tbl, data.frame) with 84 rows and 5 columns.

Variables

ID

ID of the subjects

Week

training weeks

Day

training days

TL

training load (arbitrary units)

Training_Date

training dates


Training load dataframe with rest days

Description

A dataframe with the training load of 3 subjects over 8 weeks, with rest days. Subject 1 trains 4 days per week; subject 2 trains 5 days per week with a double session on Wednesdays and does not train in week 5; subject 3 trains 3 days per week and 6 days in the last week. Created with simulated data (see data-raw/training_load_rest.R in the source code).

Usage

data("training_load_rest", package = "ACWR")

Format

A data frame with 101 rows (one per session) and 5 variables:

ID

ID of the subjects

Week

training week

Day

calendar day since the start (1 = Monday 3 January 2022)

TL

training load (arbitrary units)

Training_Date

training date (Date)