File: CAex.R

package info (click to toggle)
rmatrix 0.999375-43-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 8,068 kB
  • ctags: 2,395
  • sloc: ansic: 37,941; makefile: 216; sh: 128
file content (18 lines) | stat: -rw-r--r-- 496 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
stopifnot(require(Matrix, save=FALSE)) # at least its classes

CAex <-
    local({
	load(system.file(file.path("external", "CAex_slots.rda"), package = "Matrix"))
	## -> 'L'
	r <- new("dgCMatrix")
	for (n in c("Dim", "i","p","x"))
	    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")
}