find_xj: Identify xj values

View source: R/utils.R

find_xjR 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]

JosiahParry/sfdep documentation built on Sept. 7, 2024, 6:15 a.m.