Learn R Programming

ACWR (version 0.1.0)

EWMA: Exponentially Weighted Moving Average

Description

Exponentially Weighted Moving Average

Usage

EWMA(TL)

Arguments

TL

training load

Value

This function returns the following variables:

  • EWMA_chronic: EWMA - chronic training load.

  • EWMA_acute: EWMA - acute training load.

  • EWMA_ACWR: EWMA - Acute-Chronic Workload Ratio.

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
# Get old working directory
oldwd <- getwd()

# Set temporary directory
setwd(tempdir())

# Read db
data("training_load", package = "ACWR")

# Convert to data.frame
training_load <- data.frame(training_load)

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

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

# set user working directory
setwd(oldwd)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab