summary_metrics: Summary metrics.

Description Usage Arguments Details Value References Examples

Description

Common summary measures of interest to cyclists.

Usage

1
2
3
4
5
6
7
8
9
ride_time(x, deltat = NULL)

xPower(data)

NP(data)

pwr_TRIMP(data, CP = attr(data, "CP"))

TSS(data, CP = attr(data, "CP"))

Arguments

x

a vector of time values.

deltat

numeric; the typical interval between time values, if NULL a best estimate is used.

data

a "cycleRdata" object, produced from a read_ride function.

CP

a Critical Power value - e.g. CP or FTP.

Details

NP calculates a Normalised Power value. "Normalised Power" is a registered trademark of Peaksware Inc.

xPower; Dr. Philip Skiba/Golden Cheetah's answer to NP.

pwr_TRIMP: Power-Based TRaining IMPulse. Calculates a normalised TRIMP value using power data. This is a power-based adaptation of Bannister's TRIMP, whereby critical power (CP) is assumed to represent 90 to the score associated with one-hour's riding at CP, to aid interpretation.

ride_time is a simple function for calculating ride time, as opposed to elapsed time.

TSS calculates a Training Stress Score (TSS). TSS is a registered trademark of Peaksware Inc.

Value

a single numeric value.

References

Morton, R.H., Fitz-Clarke, J.R., Banister, E.W., 1990. Modeling human performance in running. Journal of Applied Physiology 69, 1171-1177.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(ridedata)

## Display all summary metrics with an *apply call.
fns   <- list("ride_time", "xPower", "NP", "pwr_TRIMP", "TSS")
argl  <- list(data = ridedata, x = ridedata$timer.s, CP = 300)
metrs <- vapply(fns, function(f) {
  do.call(f, argl[names(argl) %in% names(formals(f))])
}, numeric(1))

names(metrs) <- fns
print(metrs)

Example output

ride_time    xPower        NP pwr_TRIMP       TSS 
8710.0000  259.9607  254.9430  166.4725  174.7267 

cycleRtools documentation built on May 2, 2019, 10:51 a.m.