trackeR (version 1.5.2)

threshold.trackeRdata: Thresholding for variables in trackeRdata objects

Description

Thresholding for variables in trackeRdata objects

Usage

# S3 method for trackeRdata
threshold(object, variable, lower, upper, sport,
  trace = FALSE, ...)

threshold(object, ...)

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.

sport

A vector of sports (amongst 'cycling', 'running', 'swimming') with each element corresponding to variable, lower and upper

trace

Should a progress report be printed? Default is FALSE

...

Currently not used.

Details

lower and upper are always understood as referring to the units of the object.

If the 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

  • cadence_running [0, Inf] steps per min

  • cadence_cycling [0, Inf] revolutions per min

  • speed [0, Inf] meters

  • heart rate [0, 250] bpm

  • power [0, Inf] W

  • pace [0, Inf] min per km

  • duration [0, Inf] seconds

  • temperature [-20, 60] C

after they have been tranformed to the units of the object

The thresholds for speed differ across sports: for running they are [0, 12.5] meters per second, for cycling [0, 100] meters per second and for swimming [0, 5] meters per second.

Examples

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

Run the code above in your browser using DataCamp Workspace