Learn R Programming

Matrix (version 0.999375-46)

dMatrix-class: (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.

Arguments

See Also

The nonzero-pattern matrix class nMatrix, which can be used to store non-NA logical matrices even more compactly.

The numeric matrix classes dgeMatrix, dgCMatrix, and Matrix.

Examples

Run this code
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))

Run the code above in your browser using DataLab