data/wrld_1deg.R

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

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

if(FALSE) {## The reverse:
 L <- list()
 for (n in c("Dim", "i","p","x"))    L[[n]] <- slot(wrld_1deg, n)
}

Try the Matrix package in your browser

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

Matrix documentation built on Jan. 19, 2024, 1:11 a.m.