Description Usage Arguments Value Credit Author(s) See Also Examples
View source: R/t_distance_to_direct_line.R
Add deviation from shortest route from begin of track to a line
1 2 3 4 | 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:
MIT license: "psyosphere" by B. Ziepert, E. G. Ufkes & P. W. de Vries from https://CRAN.R-project.org/package=psyosphere
APA: Ziepert, B., Ufkes, E., & de Vries, P. W. (2018). psyosphere: Analyse GPS Data. Retrieved from https://CRAN.R-project.org/package=psyosphere
APA: Vries, P., Ziepert, B., & Ufkes, E. (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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run: \dontrun{
# Get data
data(psyo_rounds2)
# Create finish line
finish <- data.frame(lon = c(6.851810,6.851000), lat = c(52.241800,52.240300))
# Plot tracks and finish
plot <- plot_tracks(psyo_rounds2, t_id = "")
plot_line(finish, plot = plot)
# Get deviation from shortest rout from begin to finish
psyo_rounds2 <- distance_to_direct_line(psyo_rounds2, finish)
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.