(m0 <- new("dsRMatrix"))
m2 <- new("dsRMatrix", Dim = c(2L,2L),
x = c(3,1), j = c(1L,1L), p = 0:2)
m2
stopifnot(colSums(as(m2, "TsparseMatrix")) == 3:4)
str(m2)
if(FALSE)## FIXME: missing coercion
str(m3 <- as(Matrix(diag(2)), "dsRMatrix"))
Run the code above in your browser using DataLab