gail_nn: Number of Neighbors

Description Usage Arguments Details Value See Also

Description

Calculates the the number of neighbors for a spatial unit.

Usage

1
gail_nn(val, df1, df2, max_dist, suid, ...)

Arguments

val

Name of spatial unit from df2.

df1

Data frame of regular spatial units, must have columns latitude and longitude.

df2

Data frame of irregular spatial units, must have columns named latitude and longitude.

max_dist

The maximum distance at which two locations can be considered neighbors.

suid

The column name which contains the ID of the spatial unit.

...

Space for additional arguments, passed to sf::st_distance.

Details

This is an internal function designed to be used within gail as part of a purrr type operation.

Value

Returns the number of spatial units from df1 that are within distance max_dist of the unit val from df2.

See Also

gail


jelsema/GAIL documentation built on June 29, 2019, 11:48 a.m.