Column Sums for ENA Matrices (S3 method)
colSums.ena.matrix.RdThis S3 method computes column sums for ENA matrix objects, with optional binarization. It is used to summarize connection counts across rows (e.g., for each unit or context).
Arguments
- x
An object of class "ena.matrix" (or compatible matrix/data.frame) containing connection data.
- na.rm
Logical; whether to remove missing values (passed to `colSums`).
- dims
Integer; which dimensions to sum over (passed to `colSums`).
- binary
Logical; if TRUE, binarizes the matrix before summing (i.e., all nonzero values become 1).