colCardinalities {nscancor}R Documentation

Cardinality of Column Vectors

Description

Computes the cardinality (the number of non-zero elements) of each column of the matrix \mathbf{w}.

Usage

colCardinalities(w)

Arguments

w

a numeric matrix, e.g. xcoef as returned by nscancor

Value

A vector containing the number of non-zero elements of each column of w

Examples

# returns c(2, 1)
colCardinalities(matrix(c(1, 0, 2, -1, 0, 0), ncol = 2))



[Package nscancor version 0.7.0-6 Index]