| colSds | R Documentation |
Produce the same result as apply(x, 2, sd) and apply(x, 1, sd), respectively.
without coercing matrix to dense matrix. Values are not identical to
sd() because of the floating point precision issue in C++.
colSds(x, use_nan = FALSE)
rowSds(x, use_nan = FALSE)
x |
a base::matrix or Matrix::Matrix object. |
use_nan |
if |
a numeric vector
mt <- Matrix::rsparsematrix(100, 100, 0.9)
colSds(mt)
apply(mt, 2, sd) # the same
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.