Learn R Programming

sfdep (version 0.2.5)

pct_nonzero: Percent Non-zero Neighbors

Description

Calculate the percentage of non-zero neighbors in a neighbor list.

Usage

pct_nonzero(nb)

Value

a scalar double

Arguments

nb

a neighbor list object

Examples

Run this code
nb <- st_contiguity(guerry)
pct_nonzero(nb)

Run the code above in your browser using DataLab