fm_as_dgCMatrix | R Documentation |
Conversion between sparse matrix types
fm_as_dgCMatrix(x)
fm_as_dgTMatrix(x, unique = TRUE, ...)
fm_as_unpackedMatrix(x)
fm_as_fmesher_sparse(x)
## Default S3 method:
fm_as_dgCMatrix(x)
## S3 method for class 'fmesher_sparse'
fm_as_dgCMatrix(x)
## Default S3 method:
fm_as_dgTMatrix(x, unique = TRUE, ...)
## Default S3 method:
fm_as_unpackedMatrix(x)
## S3 method for class 'fmesher_sparse'
fm_as_unpackedMatrix(x)
## S3 method for class 'fmesher_sparse'
fm_as_dgTMatrix(x, unique = TRUE, ...)
x |
Object to be converted |
unique |
logical; if |
fm_as_dgCMatrix
returns a Matrix::dgCMatrix object.
fm_as_dgTMatrix
returns a Matrix::dgTMatrix object.
fm_as_unpackedMatrix
returns an object of virtual class
Matrix::unpackedMatrix.
fm_as_fmesher_sparse
returns an fmesher_sparse
object.
library(Matrix)
str(A <- fm_as_dgCMatrix(matrix(c(1, 2, 0, 0, 0, 3, 4, 0, 5), 3, 3)))
str(fm_as_dgTMatrix(A))
str(fm_as_unpackedMatrix(A))
str(fm_as_fmesher_sparse(A))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.