n_nbs: Count neighbors in a connectivity matrix

View source: R/convenience-functions.R

n_nbsR Documentation

Count neighbors in a connectivity matrix

Description

Count neighbors in a connectivity matrix

Usage

n_nbs(C)

Arguments

C

A connectivity matrix

Value

A vector with the number of non-zero values in each row of C

Examples


data(sentencing)
C <- shape2mat(sentencing)
sentencing$Ni <- n_nbs(C)


geostan documentation built on April 3, 2025, 10:04 p.m.