R/build_sparse_matrix.R

Defines functions build_sparse_matrix

build_sparse_matrix <- function(i, p, x = NULL, dims) {

  res <- structure(.Data = list(), i = i, p = p, x = x,
                   Dim = dims, Dimnames = vector(mode = "list",
                                                 length = length(dims)),
                   factors = list(),
                   class = ifelse(is.null(x), "ngCMatrix", "dgCMatrix"))

  return(res)

}

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.