st_nb_lag_cumul: Encompassing Higher Order Neighbors

View source: R/neighbors.R

st_nb_lag_cumulR Documentation

Encompassing Higher Order Neighbors

Description

Creates an encompassing neighbor list of the order specified. For example, if the order is 2 the result contains both 1st and 2nd order neighbors.

Usage

st_nb_lag_cumul(nb, order)

Arguments

nb

A neighbor list object as created by st_contiguity().

order

The order of neighbors.

Details

Utilizes spdep::nblag_cumul()

Value

a list of class nb

See Also

Other other: st_cardinalties(), st_nb_lag()

Examples

nb <- st_contiguity(sf::st_geometry(guerry))
st_nb_lag_cumul(nb, 3)

sfdep documentation built on Sept. 13, 2024, 5:07 p.m.