The dMatrix class is a virtual class contained by all actual classes of numeric matrices in the Matrix package. Similarly, all the actual classes of logical matrices inherit from the lMatrix class.
class
Slots
Common to all matrix object in the package:
Dim:: Object of class "integer" - the dimensions of the matrix - must be an integer vector with exactly two non-negative values.
Dimnames:: list of length two; each component containing NULL or a character vector length equal the corresponding Dim element.
Methods
There are (relatively simple) group methods (see, e.g., Arith)
group contains the seven functions `max()`, `min()`, `range()`, `prod()`, `sum()`, `any()`, and `all()`.
The following methods are also defined for all double matrices:
expm: signature(x = "dMatrix"): computes the Matrix Exponential, see expm.
The following methods are defined for all logical matrices:
which: signature(x = "lsparseMatrix") and many other subclasses of "lMatrix": as the base function which(x, arr.ind) returns the indices of the TRUE entries in x; if arr.ind is true, as a 2-column matrix of row and column indices. Since Matrix
version 1.2-9, if `useNames` is true, as by default, with `dimnames`, the same as `base::which`.
See Also
The nonzero-pattern matrix class nMatrix, which can be used to store non-NAlogical
matrices even more compactly.
The numeric matrix classes dgeMatrix, dgCMatrix, and Matrix.
drop0(x, tol=1e-10) is sometimes preferable to (and more efficient than) zapsmall(x, digits=10).