Description Usage Arguments Details Value See Also Examples
Coerce from and to a
sparse matrix representation where NA
s are not explicitly stored.
1 2 | dropNA(x)
dropNA2matrix(x)
|
x |
a matrix (for |
The representation is based on
the sparse dgCMatrix in Matrix but instead of zeros, NA
s are dropped.
Note: Be careful when working with matrix operations (multiplication, addition, etc.) since these will use the dgCMatrix superclass which assumes that all dropped values are zero and not NA! This means that the operations might remove zeros or add to NAs incorrectly.
Returns a dgCMatrix or a matrix, respectively.
dgCMatrix
in Matrix.
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.