Learn R Programming

Matrix (version 1.7-6)

dtRMatrix-class: Triangular Sparse Compressed Row Matrices

Description

The dtRMatrix class is a class of triangular, sparse matrices in the compressed, row-oriented format. In this implementation the non-zero elements in the rows are sorted into increasing columnd order.

Arguments

See Also

Classes dgCMatrix, dgTMatrix, dgeMatrix

Examples

Run this code
 
library(utils, pos = "package:base", verbose = FALSE)

(m0 <- new("dtRMatrix"))
(m2 <- new("dtRMatrix", Dim = c(2L,2L),
                        x = c(5, 1:2), p = c(0L,2:3), j= c(0:1,1L)))
str(m2)
(m3 <- as(Diagonal(2), "RsparseMatrix"))# --> dtRMatrix

Run the code above in your browser using DataLab