Learn R Programming

cycleRtools (version 1.0.0)

predict.Ptmodels: Predict Power or Time

Description

Given a Ptmodels object, the predict.Ptmodels will produce a named numeric vector of either time (seconds) or power (watts) values according to the x and y arguments

Usage

## S3 method for class 'Ptmodels':
predict(object, x, y = "P", ...)

Arguments

object
an object of class "Ptmodels".
x
the value for which to make a prediction, see below.
y
the type of variable to predict: "P" will produce a power prediction, and hence assume x is a time value; and "tsec" vice versa.
...
further arguments passed to or from other methods.

Value

  • a named numeric vector of predicted values. Names correspond to their respective models.