Learn R Programming

trackeR (version 0.0.3)

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 = "osm")
# ## multiple sessions
# plotRoute(runs, session = c(1:5, 8:11), source = "osm")
# ## different zoom level per panel
# plotRoute(runs, session = 6:7, source = "osm", zoom = c(13, 14))
# ## End(Not run)

Run the code above in your browser using DataLab