Gives a matrix classes such as sparseness and symmetry from the Matrix package. Note that a matrix cannot be both symmetric and triangular unless it is diagonal.
1 2 | format_Matrix(x, sparse = TRUE, symmetric = FALSE,
triangular = FALSE, diagonal = FALSE)
|
x |
a matrix with (or without) zero values |
sparse |
logical; gives class sparseMatrix and is almost always true. |
symmetric |
logical; gives class symmetricMatrix |
triangular |
logical; gives class triangularMatrix |
diagonal |
logical; gives class diagonalMatrix |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.