R/convert_to_sparse.R

Defines functions convert_to_sparse

convert_to_sparse <- function(M) {

  methods::as(methods::as(methods::as(M,
           "dMatrix"),
        "generalMatrix"),
     "CsparseMatrix")

}

Try the fcaR package in your browser

Any scripts or data that you put into this service are public.

fcaR documentation built on April 28, 2023, 1:11 a.m.