File: AAA.R

package info (click to toggle)
r-cran-maptools 1%3A0.7-34-2
  • links: PTS, VCS
  • area: non-free
  • in suites: squeeze
  • size: 2,184 kB
  • ctags: 232
  • sloc: ansic: 3,014; makefile: 3
file content (22 lines) | stat: -rw-r--r-- 771 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
.MAPTOOLS_CACHE <- new.env(FALSE, parent=globalenv())

.onLoad <- function(lib, pkg) {
    require(methods, quietly = TRUE, warn.conflicts = FALSE)
    require("sp")
    assign("gpclib", FALSE, envir=.MAPTOOLS_CACHE)
    cat(paste("\n\tNote: polygon geometry computations in maptools\n",
              "\tdepend on the package gpclib, which has a\n",
              "\trestricted licence. It is disabled by default;\n",
              "\tto enable gpclib, type gpclibPermit()\n"))
    cat("\nChecking rgeos availability as gpclib substitute:\n")
#    rgeosI <- require(rgeos, quietly = TRUE, warn.conflicts = FALSE)
    rgeosI <- FALSE
    cat(rgeosI, "\n")
    assign("rgeos", rgeosI, envir=.MAPTOOLS_CACHE)
}

.onUnload <- function(libpath) {
    rm(.MAPTOOLS_CACHE)
}