summary_metrics {cycleRtools} | R Documentation |
Summary metrics.
Description
Common summary measures of interest to cyclists.
Usage
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
|
data |
a "cycleRdata" object, produced from a |
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
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)