Read all supported container files from a supplied directory.
readDirectory(directory, aggregate = TRUE, table = "gps_data",
timezone = "", sessionThreshold = 2, correctDistances = FALSE,
country = NULL, mask = TRUE, fromDistances = NULL,
speedunit = list(tcx = "m_per_s", db3 = "km_per_h", json = "km_per_h"),
distanceunit = list(tcx = "m", db3 = "km", json = "km"), cycling = FALSE,
lgap = 30, lskip = 5, m = 11, silent = FALSE, parallel = FALSE,
cores = getOption("mc.cores", 2L), verbose = TRUE)
The path to the directory.
Logical. Aggregate data from different files to the same session if observations are less then sessionThreshold
hours apart? Alternatively, data from different files is stored in different sessions.
The name of the table in the database for db3 files.
The timezone of the observations as passed on to as.POSIXct
.
Ignored for JSON files.
The threshold in hours for the time difference between consecutive timestamps above which they are considered to belong to different training sessions.
Logical. Should the distances be corrected for elevation?
ISO3 country code for downloading altitude data. If NULL
, country is derived from
longitude and latitude.
Logical. Passed on to getData
. Should only the altitudes for the specified
country
be extracted (TRUE
) or also those for the neighboring countries (FALSE
)?
Logical. Should the speeds be calculated from the distance recordings
instead of taken from the speed recordings directly. Defaults to TRUE
for tcx and
Golden Cheetah's json files and to FALSE
for db3 files.
Character string indicating the measurement unit of the speeds in the container
file to be converted into meters per second. Default is m_per_s
for tcx files and km_per_h
for db3 and Golden Cheetah's json files. See Details.
Character string indicating the measurement unit of the distance in the container
file to be converted into meters. Default is m
for tcx files and km
for db3 and Golden Cheetah's json files. See Details.
Logical. Do the data stem from cycling instead of running? If so, the default unit of
measurement for cadence is set to rev_per_min
instead of steps_per_min
and power is
imputed with 0
, else with NA
.
Time in seconds corresponding to the minimal sampling rate.
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.
Number of imputed observations in each small break.
Logical. Should warnings be generated if any of the sanity checks on the data are triggered?
Logical. Should computation be carried out in parallel? (Not supported on Windows.)
Number of cores for parallel computing.
Logical. Should progress reports be printed?
An object of class trackeRdata
.
Available options for speedunit
currently are km_per_h
, m_per_s
,
mi_per_h
, ft_per_min
and ft_per_s
.
Available options for distanceunit
currently are km
, m
, mi
and
ft
.
Reading Golden Cheetah's JSON files is experimental.