data-raw/run.R

filepath <- system.file("extdata/tcx", "2013-06-30-084200.TCX", package = "trackeR")
run <- read_container(filepath,
                      type = "tcx",
                      timezone = "GMT",
                      session_threshold = 2,
                      country = NULL,
                      mask = TRUE,
                      from_distances = NULL,
                      speedunit = NULL,
                      distanceunit = NULL,
                      lgap = 30,
                      lskip = 5,
                      m = 11)
save(run, file = "data/run.rda", compress = "xz")

## all of June = 33 files, 27 sessions
filedir <- system.file("extdata/tcx", package = "trackeR") ## needs to point to git folder
runs <- readDirectory(filedir,
                      aggregate = TRUE,
                      table = "gps_data",
                      timezone = "",
                      session_threshold = 1.5, ## not the default, splits session 20
                      country = NULL,
                      mask = TRUE,
                      from_distances = NULL,
                      speedunit = list(tcx = "m_per_s", db3 = "km_per_h", json = "km_per_h"),
                      distanceunit = list(tcx = "m", db3 = "km", json = "km"),
                      lgap = 30,
                      lskip = 5,
                      m = 11,
                      verbose = TRUE,
                      silent = FALSE)
save(runs, file = "data/runs.rda", compress = "xz")
hfrick/trackeR documentation built on Feb. 3, 2024, 2:30 p.m.