View source: R/logspace.utils.R
sweep_cols.matrix | R Documentation |
An optimized function equivalent to sweep(x, 2, STATS)
for a matrix
x
.
sweep_cols.matrix(x, STATS, disable_checks = FALSE)
x |
a numeric matrix; |
STATS |
a numeric vector whose length equals to the number of columns
of |
disable_checks |
if |
A matrix of the same attributes as x
.
x <- matrix(runif(1000), ncol=4)
s <- 1:4
stopifnot(all.equal(sweep_cols.matrix(x, s), sweep(x, 2, s)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.