ww_build_neighbors {waywiser}R Documentation

Make 'nb' objects from sf objects

Description

These functions can be used for geographic or projected coordinate reference systems and expect 2D data.

Usage

ww_build_neighbors(data, nb = NULL, ..., call = rlang::caller_env())

Arguments

data

An sf object (of class "sf" or "sfc").

nb

An object of class "nb" (in which case it will be returned unchanged), or a function to create an object of class "nb" from data and ..., or NULL. See details.

...

Arguments passed to the neighbor-creating function.

call

The execution environment of a currently running function, e.g. call = caller_env(). The corresponding function call is retrieved and mentioned in error messages as the source of the error.

You only need to supply call when throwing a condition from a helper function which wouldn't be relevant to mention in the message.

Can also be NULL or a defused function call to respectively not display any call or hard-code a code to display.

For more information about error calls, see Including function calls in error messages.

Details

When nb = NULL, the method used to create neighbors from data is dependent on what geometry type data is:

Value

An object of class "nb".

Examples

ww_build_neighbors(guerry)


[Package waywiser version 0.6.0 Index]