Learn R Programming

cycleRtools (version 1.0.1)

mmv: Maximal mean values.

Description

Calculate maximal mean values for specified time periods.

Usage

mmv(data, column, pds, delta = NULL, verbose = TRUE, .uniform = FALSE,
  .correct = FALSE)

Arguments

data
a formatted dataset produced by read*().
column
column in data giving the values of interest. Needn't be quoted.
pds
window size(s) for which to generate best averages, given in seconds.
delta
the incremement with which to initially make the data uniform. If NULL (default), the most appropriate value is estimated.
verbose
should messages be printed to the console?
.uniform
are the rows of the data already uniform?
.correct
should corrected power values be generated? Mainly for internal use.

Value

  • a matrix object with two rows: 1) best mean value(s) and 2) the time at which that value was recorded

See Also

For a more generic and efficient version of this function, see mmv2

Examples

Run this code
data(cycling_data)
# Generate best powers for 5, 10 and 20 minutes.
t_sec <- c(5, 10, 20) * 60
x <- mmv(cycling_data, power.W, t_sec)
# Show when those values were recorded in minutes
x[2, ] / 60

Run the code above in your browser using DataLab