ddist_xy_sf: Calculate dyadic distances between points 'i' and 'j' from...

Description Usage Arguments Value Author(s)

View source: R/ddist_xy_sf.R

Description

This function calculates the geodesic distance between any dyads (pairs of points i and j) from spatial datasets x and y and stores the result in a long tibble

Usage

1
2
3
4
5
6
7
ddist_xy_sf(
  x = NULL,
  y = NULL,
  ids = NULL,
  crs_transform = FALSE,
  new_crs = NULL
)

Arguments

x

an object of class sf ("sf" "data.frame" or "sf" "tbl_df" "tbl" "data.frame")

y

an object of class sf ("sf" "data.frame" or "sf" "tbl_df" "tbl" "data.frame")

ids

variables uniquely identifying geospatial points in data x and y. Can be of type numeric, integer, character, or factor

crs_transform

a logical value indicating whether to transform the CRS. Defaults to FALSE

new_crs

a valid EPSG for a new CRS. See rgdal::make_EPSG() or https://epsg.org/home.html

Value

a long tibble with dyads and dyadic distances incl. a distance unit indicator

Author(s)

Jeppe Vierø


jvieroe/dyadicdist documentation built on Jan. 21, 2022, 8:43 a.m.