distance_point {psyosphere}R Documentation

Add the distances to a point from each coordinate

Description

Add the distances to a point from each coordinate

Usage

distance_point(
  tracks, point, bind = TRUE, drop = TRUE, cname = "dis_to_point_in_m"
)

Arguments

tracks

psyo. Data frame with tracks.

point

list. A list with the column lon (numeric) and lat (numeric) and the length of 1.

bind

logical. Return the distance as list (FALSE) or add it to tracks (TRUE).

drop

logical. If TRUE and only one observation is returned drop the data frame and collapse the return value to a vector.

cname

character. Column name of the returned calculation result.

Value

psyo

Credit

If you use Psyosphere for commercial use or research, please support us by include one off the following references:

Author(s)

Benjamin Ziepert. Please send feedback to: feedback-psyosphere@analyse-gps.com.

See Also

distance_line,distance_peers, distance_psyo

Examples

data(psyo)
point <- data.frame(lon = 4.936197, lat = 52.314701)
coordinates <- psyosphere::distance_point(psyo, point)

[Package psyosphere version 0.1 Index]