Learn R Programming

sfdep (version 0.2.5)

include_self: Includes self in neighbor list

Description

Includes observed region in list of own neighbors. For some neighbor lists, it is important to include the ith observation (or self) in the neighbors list, particularly for kernel weights.

Usage

include_self(nb)

remove_self(nb)

Value

An object of class nb.

Arguments

nb

an object of class nb e.g. made by st_contiguity()

Examples

Run this code
nb <- st_contiguity(guerry)
self_included <- include_self(nb)
self_included
remove_self(self_included)

Run the code above in your browser using DataLab