SCM

SCM Repository

[matrix] Annotation of /pkg/R/zzz.R
ViewVC logotype

Annotation of /pkg/R/zzz.R

Parent Directory Parent Directory | Revision Log Revision Log


Revision 908 - (view) (download)

1 : maechler 829 .onLoad <- function(libname, pkgname)
2 :     {
3 :     ## The following works around namespace-protection on purpose:
4 :     assignInNamespace("..Old..as.matrix", base::as.matrix, ns = "base")
5 :     assignInNamespace("as.matrix", as.matrix, ns = "base")
6 :     ## Now all the functions in 'base' that start with something like
7 :     ## "x <- as.matrix(x)"
8 :     ## will work for 'Matrix'-matrices
9 : maechler 908
10 :     if(paste(R.version$major, R.version$minor, sep=".") >= "2.2")
11 :     methods:::bind_activation(TRUE)
12 : maechler 829 }
13 :    
14 :     .onUnload <- function(libpath)
15 :     {
16 :     assignInNamespace("as.matrix", base::..Old..as.matrix, ns = "base")
17 :     library.dynam.unload("Matrix", libpath)
18 : maechler 908
19 :     if(paste(R.version$major, R.version$minor, sep=".") >= "2.2")
20 :     methods:::bind_activation(FALSE)
21 : maechler 829 }

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge