plot_tracks: Plot tracks on a map

Description Usage Arguments Value Author(s) See Also Examples

View source: R/plot_tracks.R

Description

Plot tracks in the psyo format on map.

Usage

1
2
3
4
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.

Author(s)

Benjamin Ziepert

See Also

plot_map, plot_line, plot_polygon

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: \dontrun{
# Plot tracks
data(psyo_rounds2)
plot <- plot_tracks(psyo_rounds2)
plot

# Get zoom level
plot$zoom
}
## End(Not run)

psyosphere documentation built on July 2, 2020, 12:08 a.m.