Learn R Programming

cycleRtools (version 1.0.0)

dist_plot: Time distribution plot.

Description

Display the time distribution of values within a dataset. The distribution can also be partitioned into zones if the zbounds argument is not NULL.

Usage

dist_plot(data, column = "power.W", binwidth = 10, zbounds = NULL,
  xlab = NULL, xlim = NULL, ylim = NULL)

Arguments

data
a formatted dataset produced by read*().
column
column in data giving the values of interest. Needn't be quoted.
binwidth
how should values in column be binned? E.g. bindiwdth = 10 will create 10 watt bins if column is power data.
zbounds
optional; a numeric vector of zone boundaries.
xlab
x axis label.
xlim
numeric vector of length 2; x axis limits.
ylim
numeric vector of length 2; y axis limits.

Value

  • a ggplot object.

Examples

Run this code
data(cycling_data)
dist_plot(
 data = cycling_data,
 column = power.W,
 binwidth = 10,
 zbounds = c(100, 200, 300),
 xlim = c(110, 500)
)

Run the code above in your browser using DataLab