Description Usage Arguments Value Author(s) Examples
Convert a matrix or sparse matrix into the sparse format used by INLA (dgTMatrix)
1 2 | inla.as.sparse(...)
inla.as.dgTMatrix(A, unique = TRUE, na.rm = FALSE, zeros.rm = FALSE)
|
... |
The arguments. The matrix or sparse matrix, and the additonal arguments |
A |
The matrix |
unique |
Logical. If |
na.rm |
Replace |
zeros.rm |
Remove zeros in the matrix. |
inla.as.sparse
and inla.as.dgTMatrix
is the same function.
The returned value is a sparse matrix in the dgTMatrix
-format.
Havard Rue hrue@r-inla.org
1 2 | A = matrix(1:9, 3, 3)
inla.as.sparse(A)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.