Learn R Programming

psyosphere (version 0.1.6)

plot_tracks: Plot tracks on a map

Description

Plot tracks in the psyo format on map.

Usage

plot_tracks(
  tracks, single = FALSE, line = TRUE, dots = TRUE, plot = "", zoom = -1,
  save_dir = "", cgaps = "", t_id = "id"
)

Arguments

tracks

psyo. Tracks that will be plotted.

single

logical. Display the plotted maps. Between each plot the script will wait for user confirmation until the next plot will be displayed.

line

logical. Whether to draw a line between the coordinates.

dots

logical. Whether to display the coordinates.

plot

ggmap. An existing map / plot where the tracks are added. If no plot is provided a Google map will be downloaded.

zoom

numeric. Zoom factor of the map. See ggmap::get_googlemap.

save_dir

character. Save the plots in a directory. If empty no plots will be saved.

cgaps

character. Column name of tracks that marks gaps with TRUE.

t_id

character or integer. The column name that identifies the different tracks. Use t_id = "" to process all tracks.

Value

A ggmap object.

See Also

plot_map, plot_line, plot_polygon

Examples

Run this code
# NOT RUN {
\dontrun{
# Plot tracks
data(psyo_rounds2)
plot <- plot_tracks(psyo_rounds2)
plot

# Get zoom level
plot$zoom
}
# }

Run the code above in your browser using DataLab