Learn R Programming

cycleRtools (version 1.1.1)

plot.cycleRdata: Plot cycling data.

Description

Generate plots to effectively summarise a cycling dataset.

Usage

"plot"(x, y = 1:3, xvar = "timer.s", xlab = NULL, xlim = NULL, CP = attr(x, "CP"), laps = FALSE, breaks = TRUE, ...)

Arguments

x
a "cycleRdata" object produced by read*().
y
numeric; plots to be created (see details).
xvar
character; name of the column to be plotted as the xvariable.
xlab
character; x axis label for bottom plot.
xlim
given in terms of x.
CP
a value for critical power annotation.
laps
logical; should laps be seperately coloured?
breaks
logical; should plot lines be broken when stationary? Will only show when xvar represents time values.
...
graphical parameters, and/or arguments to be passed to or from other methods.

Value

a variable number of plots.

Details

The y argument describes plot options such that:
  1. plots power data (W).
  2. plots an elevation profile (m).
These options can be combined to produce a stack of plots as desired.

Examples

Run this code
## Not run: 
# data(ridedata)
# 
# plot(ridedata, xvar = "timer.min")
# plot(ridedata, xvar = "distance.km")
# 
# ## With only two plots.
# plot(ridedata, y = c(2, 1))
# 
# ## Using xlim, note that title metrics adjust.
# plot(ridedata, xvar = "timer.min", xlim = c(100, 150))
# 
# ## Lap colouring.
# data(intervaldata)
# plot(intervaldata, xvar = "timer.min", laps = TRUE)
# ## End(Not run)

Run the code above in your browser using DataLab