View source: R/convenience-functions.R
n_nbs | R Documentation |
Count neighbors in a connectivity matrix
n_nbs(C)
C |
A connectivity matrix |
A vector with the number of non-zero values in each row of C
data(sentencing)
C <- shape2mat(sentencing)
sentencing$Ni <- n_nbs(C)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.