toCsparse | R Documentation |
Exactly what it says in the title.
toCsparse(x)
x |
Any object produced by block processing with |
This is intended for use inside functions to be passed to colBlockApply
or rowBlockApply
.
The idea is to pre-process blocks for user-defined functions that don't know how to deal with SparseMatrix objects,
which is often the case for R-defined functions that do not benefit from beachmat's C++ abstraction.
x
is returned unless it is a SparseMatrix object from the SparseArray package,
in which case an appropriate CsparseMatrix object is returned instead.
Aaron Lun
library(SparseArray)
out <- COO_SparseArray(c(10, 10),
nzcoo=cbind(1:10, sample(10)),
nzdata=runif(10))
toCsparse(out)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.