Tried to compare create_tcm() and fcm(). Got following:
Error in asMethod(object) :
Cholmod error 'problem too large' at file ../Core/cholmod_dense.c, line 105
9.asMethod(object)
8.as(x, "matrix")
7.as.matrix.Matrix(x)
6.as.matrix(x)
5.lower.tri(result, diag = FALSE)
This casts sparse matrix to dense (see source code for base::lower.tri() function):
# discard the lower diagonal if tri == TRUE
if (tri)
result[lower.tri(result, diag = FALSE)] <- 0
Should be trivial to do it with Matrix functions and without casting to dense.
Tried to compare
create_tcm()andfcm(). Got following:This casts sparse matrix to dense (see source code for
base::lower.tri()function):Should be trivial to do it with
Matrixfunctions and without casting to dense.