File: KNex.R

package info (click to toggle)
rmatrix 1.7-5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,156 kB
  • sloc: ansic: 97,207; makefile: 280; sh: 165
file content (12 lines) | stat: -rw-r--r-- 381 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
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
    })