n_nbs {geostan} | R 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)
[Package geostan version 0.8.1 Index]