Description Usage Arguments Value Author(s) See Also Examples
Takes XY coordinates of two sets of locations and returns cross distance for all entries.
1 | get_crossdist(xy1, xy2, id1 = NULL, id2 = NULL)
|
xy1 |
two column matrix of XY coordinates for first group |
xy2 |
two column matrix of XY coordinates for second group |
id1 |
optional names for first group |
id2 |
optional names for second group |
numeric scalar or vector
John Giles
Other data synthesis:
get_distance_matrix()
,
get_mob_matrix()
,
get_stay_data()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Some XY coords in decimal degrees
xy1 <- data.frame(x=rnorm(3, -90, 1),
y=rnorm(3, 30, 1),
id=LETTERS[1:3])
xy2 <- data.frame(x=rnorm(5, -90, 1),
y=rnorm(5, 35, 1),
id=LETTERS[4:8])
D <- get_crossdist(xy1=xy1[,1:2],
xy2=xy2[,1:2],
id1=xy1[,3],
id2=xy2[,3])
D
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.