Learn R Programming

trackeR (version 0.0.3)

threshold: Thresholding for variables in trackeRdata objects.

Description

Thresholding for variables in trackeRdata objects.

Usage

threshold(object, variable, lower, upper, ...)

Arguments

object
An object of class trackeRdata.
variable
A vector containing the names of the variables to which thresholding is applied. See Details.
lower
A vector containing the corresponding lower thresholds. See Details.
upper
A vector containing the corresponding upper thresholds. See Details.
...
Currently not used.

Details

Argument variable can also be a data frame containing the variable names, lower, and upper thresholds. If arguments variable, lower, and upper are all unspecified, the following default thresholds are employed: latitude [-90, 90] degrees, longitude [-180, 180] degrees, altitude [-500, 9000] m, distance [0, Inf] meters, heart rate [0, 250] bpm, power [0, Inf] W, pace [0, Inf] min per km, duration [0, Inf] seconds. The thresholds for speed differ for running, [0, 12.5] meters per second, and cycling, [0, 100] meters per second. Default thresholds are converted to the units of measurment of the object before they are applied.

Examples

Run this code
data("runs", package = "trackeR")
plot(runs, session = 4, what = "speed", threshold = FALSE)
runsT <- threshold(runs, variable = "speed", lower = 0, upper = 12.5)
plot(runsT, session = 4, what = "speed", threshold = FALSE)

Run the code above in your browser using DataLab