find_xj {sfdep}R Documentation

Identify xj values

Description

Find xj values given a numeric vector, x, and neighbors list, nb.

Usage

find_xj(x, nb)

Arguments

x

a vector of any class

nb

a nb object e.g. created by st_contiguity() or st_knn()

Value

A list of length x where each element is a numeric vector with the same length as the corresponding element in nb.

Examples

nb <- st_contiguity(sf::st_geometry(guerry))
xj <- find_xj(guerry$crime_prop, nb)
xj[1:3]

[Package sfdep version 0.2.4 Index]