n_nbs function

Count neighbors in a connectivity matrix

Count neighbors in a connectivity matrix

n_nbs(C)

Arguments

  • C: A connectivity matrix

Returns

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)
  • Maintainer: Connor Donegan
  • License: GPL (>= 3)
  • Last published: 2024-12-04