colZeros: Count number of zeros in columns and rows in sparse matrix

Description Usage Arguments Examples

View source: R/proxy.R

Description

Produces the same result as applying sum(x == 0) to each row or column.

Usage

1
2
3

Arguments

x

Matrix object

Examples

1
2
3
mt <- Matrix::rsparsematrix(100, 100, 0.01)
colZeros(mt)
apply(mt, 2, function(x) sum(x == 0)) # the same

proxyC documentation built on July 21, 2019, 9:04 a.m.