smth_plot {cycleRtools} | R Documentation |
Create a plot with both raw and smoothed data lines.
smth_plot(data, x = "timer.s", yraw = "power.W", ysmth = "power.smooth.W", colour = "lap", ..., character.only = FALSE)
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 |
... |
further arguments to be passed to |
character.only |
are column name arguments given as character strings? A backdoor around non-standard evaluation. |
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")