View source: R/helpers_sparse_matrix.R
apply2_sp | R Documentation |
Sparse matrix version of the apply function. Avoid errors when working with large matrix. Apply the function on each element or column. It is the same as the apply1_sp, but for columns. The matrix is transposed.
apply2_sp(X, FUN)
X |
matrix; data. |
FUN |
function. |
res; the result depends on the function. If the function aggregates, then it will do it by rows and return a vector. If the function does not aggreate, it will return a list with each row.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.