search for: gethook

Displaying 5 results from an estimated 5 matches for "gethook".

Did you mean: sethook
2011 Jan 23
2
feature request: additional hook in plot.new()
...cs device that the new plot will appear in. The code change needed for this is simple - just 4 new lines of R code in src/library/graphics/R/plot.R:plot.new() Current definition of plot.new() in src/library/graphics/R/plot.R: plot.new <- function() { .Internal(plot.new()) for(fun in getHook("plot.new")) { if(is.character(fun)) fun <- get(fun) try(fun()) } invisible() } New definition of plot.new() in src/library/graphics/R/plot.R: plot.new <- function() { for(fun in getHook("plot.prenew")) { if(is.character(fun)) fu...
2014 Feb 25
1
What this error means
...ught segfault *** address 0x102, cause 'memory not mapped' Traceback: 1: sys.parent() 2: sys.function(sys.parent()) 3: formals(sys.function(sys.parent())) 4: match.arg(event) 5: packageEvent(pkgname, "detach") 6: exists(hookName, envir = .userHooksEnv, inherits = FALSE) 7: getHook(packageEvent(pkgname, "detach")) 8: detach("package:td", unload = TRUE) Possible actions: 1: abort (with core dump, if enabled) 2: normal R exit 3: exit R without saving workspace 4: exit R saving workspace Thanks, Sandip [[alternative HTML version deleted]]
2005 Jun 10
1
Exiting R and package detachment?
...The best I can think of now is to "hack" .Last() by doing something like if (!exists(".LastOriginal", mode="function")) { .LastOriginal <<- get(".Last", envir=.GlobalEnv); .Last <<- function(..., envir=parent.frame()) { for (fun in getHook(".Last")) { if (is.character(fun)) fun <- get(fun, mode="function") try(fun()); } eval(.LastOriginal(...), envir=envir); } # .Last() } Then in package <pkg>: .First.lib <- function(libname, pkgname) { # Detach package when R fi...
2008 Feb 13
0
RFC for package PopCon: a popularity contest for R and packages
...d, maybe R core would be interested in this. 3. What exactly is PopCon tracking as far as symbol names go? It currently used an R_ObjectTable object attached to the search path to capture names, but is this the best way? see http://www.omegahat.org/RObjectTables/. It's also replacing base::getHook to trap library loads. 4. What else would be interesting to track? Some folks have suggested various bits of R.Version() output. Here's what PopCon can currently do: > library(PopCon) > search() [1] ".GlobalEnv" "package:PopCon" ".pcUDB" [...
2008 Feb 14
0
RFC for package PopCon: a popularity contest for R and packages
...d, maybe R core would be interested in this. 3. What exactly is PopCon tracking as far as symbol names go? It currently used an R_ObjectTable object attached to the search path to capture names, but is this the best way? see http://www.omegahat.org/RObjectTables/. It's also replacing base::getHook to trap library loads. 4. What else would be interesting to track? Some folks have suggested various bits of R.Version() output. Here's what PopCon can currently do: > library(PopCon) > search() [1] ".GlobalEnv" "package:PopCon" ".pcUDB" [...