trackeR (version 1.5.2)

impute_speeds: Impute speeds

Description

Impute speeds of 0 during small breaks within a session.

Usage

impute_speeds(session_data, from_distances = TRUE, lgap = 30,
  lskip = 5, m = 11, sport = "cycling", units = NULL)

imputeSpeeds(session_data, from_distances = TRUE, lgap = 30, lskip = 5, m = 11, sport = "cycling", units = NULL)

Value

A multivariate zoo object with imputed observations: 0 for speed, last known position for latitude, longitude and altitude, NA for all other variables. Distances are calculated based on speeds after imputation.

Arguments

session_data

A multivariate zoo object with observations of either distance or speed (named Distance or Speed, respectively).

from_distances

Logical. Should the speeds be calculated from the distance recordings instead of taken from the speed recordings directly?

lgap

Time in seconds corresponding to the minimal sampling rate.

lskip

Time in seconds between the last observation before a small break and the first imputed speed or the last imputed speed and the first observation after a small break.

m

Number of imputed observations in each small break.

sport

What sport does sessions_data contain data of? Either 'cycling' (default), 'running', 'swimming'.

units

Units of measurement.

References

Kosmidis, I., and Passfield, L. (2015). Linking the Performance of Endurance Runners to Training and Physiological Effects via Multi-Resolution Elastic Net. ArXiv e-print arXiv:1506.01388.

Frick, H., Kosmidis, I. (2017). trackeR: Infrastructure for Running and Cycling Data from GPS-Enabled Tracking Devices in R. Journal of Statistical Software, 82(7), 1--29. doi:10.18637/jss.v082.i07