Class SFBM
A reference class for storing and accessing sparse matrix-like data stored in files on disk.
Convert a dgCMatrix or dsCMatrix to an SFBM.
as_SFBM(spmat, backingfile = tempfile())
spmat |
A dgCMatrix (non-symmetric sparse matrix of type 'double') or dsCMatrix (symmetric sparse matrix of type 'double'). |
backingfile |
Path to file where to store data. Extension |
An object of class SFBM has many fields:
$address
: address of the external pointer containing the underlying
C++ object to be used as a XPtr<SFBM>
in C++ code
$extptr
: (internal) use $address
instead
$nrow
: number of rows
$ncol
: number of columns
$nval
: number of non-zero values
$p
: vector of column positions
$backingfile
or $sbk
: File with extension 'sbk' that stores the
data of the SFBM
$rds
: 'rds' file (that may not exist) corresponding to the 'sbk' file
$is_saved
: whether this object is stored in $rds
?
And some methods:
$save()
: Save the SFBM object in $rds
. Returns the SFBM.
$add_columns()
: Add new columns from another sparse dgCMatrix.
The new SFBM.
spmat <- Matrix::rsparsematrix(1000, 1000, 0.01) class(spmat) (X <- as_SFBM(spmat))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.