data/KNex.R

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

KNex <-
    local({
	load(system.file(file.path("external", "KNex_slots.rda"), package = "Matrix"))
	## -> 'L'
	r <- list(mm = methods::new("dgCMatrix"), y = L[["y"]])
        `slot<-` <- methods::`slot<-`
	for (n in c("Dim", "i","p","x")) ## needs methods::slot<-
	    slot(r$mm, n) <- L[[n]]
	r
    })

Try the Matrix package in your browser

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

Matrix documentation built on Nov. 14, 2023, 5:06 p.m.