distance_to_direct_line {psyosphere} | R Documentation |
Add deviation from shortest route from begin of track to a line
distance_to_direct_line( tracks, line, bind = TRUE, drop = TRUE, cname = "distance_to_direct_line", t_id = "id" )
tracks |
|
line |
list. A list with the column lon (numeric) and lat (numeric). |
t_id |
character or numeric. Column name in |
bind |
logical. Return the distance as list ( |
drop |
|
cname |
|
psyo
. Distance in meter.
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_rounds2) data(psyo_rounds_map) # Create finish line finish <- data.frame(lon = c(6.851810,6.851000), lat = c(52.241800,52.240300)) # Plot tracks and finish plot <- psyosphere::plot_tracks(psyo_rounds2, t_id = "", plot = psyo_rounds_map) # plot <- psyosphere::plot_tracks(psyo_rounds2, t_id = "") psyosphere::plot_line(finish, plot = plot) # Get deviation from shortest rout from begin to finish psyo_rounds2 <- psyosphere::distance_to_direct_line(psyo_rounds2, finish)