Skip to contents

Column sums of network matrix. Includes the diagonal entry for each node. In typical DBN usage the diagonal is NA or zero, so the result matches the conventional in-degree. If your matrix has non-zero diagonal entries, subtract them manually.

Usage

stat_in_degree(X)

Arguments

X

Network matrix

Value

Vector of in-degrees

Examples

X <- matrix(c(0, 1, 0, 1, 0, 1, 0, 0, 0), 3, 3)
stat_in_degree(X)
#> [1] 1 2 0