smth_plot {cycleRtools}R Documentation

Smoothed data plot.

Description

Create a plot with both raw and smoothed data lines.

Usage

smth_plot(data, x = "timer.s", yraw = "power.W", ysmth = "power.smooth.W",
  colour = "lap", ..., character.only = FALSE)

Arguments

data

the dataset to be used.

x

column identifier for the x axis data.

yraw

column identifier for the (underlying) raw data.

ysmth

column identifier for the smoothed data.

colour

level identifier in data by which to colour lines. Or a colour name.

...

further arguments to be passed to plot().

character.only

are column name arguments given as character strings? A backdoor around non-standard evaluation.

Examples

data(ridedata)

## Plot with a single blue line (default arguments):
smth_plot(ridedata, colour = "blue", main = "Single Colour",
          xlab = "Time (seconds)", ylab = "Power (watts)")

## Create some laps.
ridedata$lap <- ceiling(seq(from = 1.1, to = 5, length.out = nrow(ridedata)))
## Plot with lap colours.
smth_plot(ridedata, timer.min, power.W, power.smooth.W, colour = "lap",
          xlab = "Time (mins)", ylab = "Power (watts)", main = "Lap Colours")


[Package cycleRtools version 1.1.1 Index]