Learn R Programming

Matrix (version 1.7-4)

lsyMatrix-class: Symmetric Dense Logical Matrices

Description

The "lsyMatrix" class is the class of symmetric, dense logical matrices in non-packed storage and "lspMatrix" is the class of of these in packed storage. In the packed form, only the upper triangle or the lower triangle is stored.

Arguments

See Also

lgeMatrix, Matrix, t

Examples

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

(M2 <- Matrix(c(TRUE, NA, FALSE, FALSE), 2, 2)) # logical dense (ltr)
str(M2)
# can
(sM <- M2 | t(M2)) # "lge"
as(sM, "symmetricMatrix")
str(sM <- as(sM, "packedMatrix")) # packed symmetric

Run the code above in your browser using DataLab