colSds: Standard deviasion of columns and rows in sparse matrix

Description Usage Arguments Examples

View source: R/proxy.R

Description

Produces the same result as apply(x, 1, sd) or apply(x, 2, sd) as without coecirng matrix to dense matrix. Values are not identical to sd because of the floating point precision issue in C++.

Usage

1
2
3
colSds(x)

rowSds(x)

Arguments

x

Matrix object

Examples

1
2
3
mt <- Matrix::rsparsematrix(100, 100, 0.01)
colSds(mt)
apply(mt, 2, sd) # the same

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