trackeR (version 1.5.2)

plot_route: 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

plot_route(x, session = 1, zoom = NULL, speed = TRUE,
  threshold = TRUE, mfrow = NULL, maptype = "toner",
  messaging = FALSE, ...)

plotRoute(x, session = 1, zoom = NULL, speed = TRUE, threshold = TRUE, mfrow = NULL, maptype = "toner", messaging = FALSE, ...)

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_stamenmap (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. #' @param source Passed to get_map. Default is "stamen".

maptype

Passed to get_stamenmap. Default is "toner".

messaging

Passed to get_stamenmap. Default is FALSE.

...

Additional arguments passed on to threshold and get_stamenmap.

See Also

get_stamenmap, ggmap

Examples

Run this code
if (FALSE) {
data('runs', package = 'trackeR')
plot_route(runs, session = 4, zoom = 13)
plot_route(runs, session = 4, zoom = 13, maptype = "terrain")
## multiple sessions
plot_route(runs, session = c(1:4, 8:11))
## different zoom level per panel
plot_route(runs, session = 6:7, zoom = c(13, 14))
}

Run the code above in your browser using DataLab