average_duplicates {psyosphere} | R Documentation |
Correct coordinates with the same time by replacing with one coordinate with a geomean position.
average_duplicates(tracks, t_id = "id")
tracks |
|
t_id |
character or numeric. Column name in |
If you use Psyosphere for commercial use or research, please support us by include one off the following references:
Creative Commons: "Psyosphere" by B. Ziepert, E. G. Ufkes & P. W. de Vries from analyse-gps.com / CC-BY-SA-4.0
APA: de Vries, P. W., et al. (2016). "De psychologie van bewegingen GPS-technologie voor de analyse van natuurlijk gedrag." Tijdschrift voor Human Factors 2: 11-15.
Benjamin Ziepert. Please send feedback to: feedback-psyosphere@analyse-gps.com.
# Get data data(psyo) data(psyo_map) psyo <- psyo[c(1,15),] psyo[2, c("time","id")] <- psyo[1, c("time","id")] # Plot coordinates # psyo_map <- psyosphere::plot_map(psyo) plot <- psyo_map + ggplot2::geom_point(data = psyo, size = 5) plot <- psyosphere::plot_line(psyo[,c("lon", "lat")], plot = plot) plot # Calculate mean position psyo <- psyosphere::average_duplicates(psyo) # Plot mean position plot + ggplot2::geom_point(data = psyo, size = 5)