50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

trackeR (version 1.0.0)

plotRoute: Plot routes for training sessions.

Description

Plot the route ran/cycled during training onto a background map. Internet connection is required to download the background map.

Usage

plotRoute(x, session = 1, zoom = NULL, speed = TRUE, threshold = TRUE,
  mfrow = NULL, ...)

Arguments

x

A object of class trackeRdata.

session

A numeric vector of the sessions to be plotted. Defaults to the first session, all sessions can be plotted by session = NULL.

zoom

The zoom level for the background map as passed on to get_map (2 corresponds roughly to continent level and 20 to building level).

speed

Logical. Should the trace be colored according to speed?

threshold

Logical. Should thresholds be applied?

mfrow

A vector of 2 elements, number of rows and number of columns, specifying the layout for multiple sessions.

...

Additional arguments passed on to threshold and get_map, e.g., source and maptype.

See Also

get_map, ggmap

Examples

Run this code
# NOT RUN {
data("runs", package = "trackeR")
plotRoute(runs, session = 4, zoom = 13)
plotRoute(runs, session = 4, zoom = 13, maptype = "hybrid")
plotRoute(runs, session = 4, zoom = 13, source = "stamen")
## multiple sessions
plotRoute(runs, session = c(1:5, 8:11), source = "google")
## different zoom level per panel
plotRoute(runs, session = 6:7, source = "google", zoom = c(13, 14))
# }

Run the code above in your browser using DataLab