File: USCounties.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 (17 lines) | stat: -rw-r--r-- 408 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
stopifnot(require(Matrix, save=FALSE)) # at least its classes

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

## The reverse:
##  L <- list()
##  for (n in c("Dim", "i","p","x"))    L[[n]] <- slot(USCounties, n)