dMatrix-class {Matrix}R Documentation

(Virtual) Class "dMatrix" of "double" Matrices

Description

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.

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)

Arith
signature(e1 = "dMatrix", e2 = "dMatrix"): ...
Arith
signature(e1 = "dMatrix", e2 = "numeric"): ...
Arith
signature(e1 = "numeric", e2 = "dMatrix"): ...
Math
signature(x = "dMatrix"): ...
Math2
signature(x = "dMatrix", digits = "numeric"): this group contains round() and signif().
Compare
signature(e1 = "numeric", e2 = "dMatrix"): ...
Compare
signature(e1 = "dMatrix", e2 = "numeric"): ...
Compare
signature(e1 = "dMatrix", e2 = "dMatrix"): ...
Summary
signature(x = "dMatrix"): The "Summary" group contains the seven functions max(), min(), range(), prod(), sum(), any(), and all().

The following methods are also defined for all double matrices:

coerce
signature(from = "dMatrix", to = "matrix"): ...
expm
signature(x = "dMatrix"): computes the “Matrix Exponential”, see expm.
zapsmall
signature(x = "dMatrix"): ...

See Also

The nonzero-pattern matrix class nMatrix, and the numeric matrix classes dgeMatrix, dgCMatrix, and Matrix.

Examples

 showClass("dMatrix")

 set.seed(101)
 round(Matrix(rnorm(28), 4,7), 2)
 (M <- zapsmall(Matrix(rlnorm(56, sd=10), 4,14)))
 table(as.logical(M == 0))

[Package Matrix version 0.999375-29 Index]