dgRMatrix-class | R Documentation |

The `dgRMatrix`

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

**Note:** The column-oriented sparse classes, e.g.,
`dgCMatrix`

, are preferred and better supported in
the Matrix package.

Objects can be created by calls of the form `new("dgRMatrix", ...)`

.

`j`

:Object of class

`"integer"`

of length nnzero (number of non-zero elements). These are the column numbers for each non-zero element in the matrix.`p`

:Object of class

`"integer"`

of pointers, one for each row, to the initial (zero-based) index of elements in the row.`x`

:Object of class

`"numeric"`

- the non-zero elements of the matrix.`Dim`

:Object of class

`"integer"`

- the dimensions of the matrix.

- diag
`signature(x = "dgRMatrix")`

: returns the diagonal of`x`

- dim
`signature(x = "dgRMatrix")`

: returns the dimensions of`x`

- image
`signature(x = "dgRMatrix")`

: plots an image of`x`

using the`levelplot`

function

the `RsparseMatrix`

class, the virtual class of all
sparse compressed **r**ow-oriented matrices, with its methods.
The `dgCMatrix`

class (**c**olumn compressed
sparse) is really preferred.

Matrix documentation built on Nov. 14, 2023, 5:06 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.