dwww Home | Show directory contents | Find package

stopifnot(requireNamespace("Matrix" , quietly = TRUE)) # includes 'methods'

CAex <-
    local({
        load(system.file(file.path("external", "CAex_slots.rda"), package = "Matrix"))
        ## -> 'L'
        r <- methods::new("dgCMatrix")
        for (n in c("Dim", "i","p","x"))
            methods::slot(r, n) <- L[[n]]
        r
    })

## The reverse { CAex |--> L } is
if(FALSE) {
    sNms <- c("Dim", "i", "p", "x")
    L <- lapply(sNms, function(N) slot(CAex, N)); names(L) <- sNms
    save(L, file = "/u/maechler/R/Pkgs/Matrix/inst/external/CAex_slots.rda")
}

Generated by dwww version 1.15 on Tue Jul 2 05:42:11 CEST 2024.