Learn R Programming

cycleRtools (version 1.0.0)

smth_plot: Smoothed data plot.

Description

Create a plot with both raw and smoothed data lines. Convenience wrapper for plot whereby two plots are overaid with par(new = TRUE).

Usage

smth_plot(data, x = "timer.s", yraw = "power.W", ysmth = "power.smooth.W",
  xlim = NULL, ...)

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.
xlim
optional xlim values to be passed to plot().
...
further arguments to be passed to plot().

Examples

Run this code
data(cycling_data)
smth_plot(cycling_data, timer.s, power.W, power.smooth.W)  # Default arguments.

Run the code above in your browser using DataLab