similar to: How to unload a dll loaded via library.dynam()?

Displaying 20 results from an estimated 10000 matches similar to: "How to unload a dll loaded via library.dynam()?"

2010 Sep 16
1
Possible bug or annoyance with library.dynam.unload()
Hello, I have a package with a namespace. Because I use Roxygen that overwrites the NAMESPACE file each time it is run, I use a R/zzz.R file with an .onLoad() and .onUnload() functions to take care of loading and unloading my shared library. The problem: if I load my library from a local directory, then the unloading of the package fails, e.g: # loads fine >library(Foo,
2006 Feb 08
2
Using .onUnload() to unload compiled code
If one wants to unload compiled code for a package containing a namespace, my understanding is that .onUnload() should be used, with a call to library.dynam.unload(). This is used in e.g., the stats and methods packages, but it appears to me that the compiled code is not being unloaded when the package is detached(). Am I misunderstanding something? Best, Jim > search() [1]
2016 Mar 25
1
library.dynam.unload
The survival package has a firstlib.R file that I had forgotton and just reviewed. After deleting several bits which had a use 10 years ago during my Splus to R transition, the only thing remaining is .onUnload <- function(libpath) library.dynam.unload("survival", libpath) Does this bit of code still serve a purpose? Can I toss it? Terry T.
2006 Aug 25
5
Quickie : unload library
Dear list, I know it must be obvious and I did my homework. (In fact I've RSiteSearched with keyword "remove AND library" but got timed out.(why?)....) How do I unload a library? I don't mean getting ride of it permanently but just to unload it for the time being. A related problem : I have some libraries loaded at startup in .First() which I have in .Rprofile. Now, I exited R
2015 Jan 08
4
unloadNamespace
In the documentation the closed thing I see to an explanation of this is that ?detach says "Unloading some namespaces has undesirable side effects" Can anyone explain why unloading tseries will load zoo? I don't think this behavior is specific to tseries, it's just an example. I realize one would not usually unload something that is not loaded, but I would expect it to do
2012 Jul 24
1
Using .onUnload to unload DLLs
I've noticed that many of the "base" R packages have an .onUnload() function which automatically unloads compiled shared libraries with library.dynam.unload(). For example: > stats:::.onUnload function (libpath) library.dynam.unload("stats", libpath) <bytecode: 0x1033b9c30> <environment: namespace:stats> I've noticed that many other packages don't
2016 May 06
2
Is it possible to increase MAX_NUM_DLLS in future R releases?
Thanks for all your great answers. The app I?m working on is indeed an exploratory data analysis tool for gene expression, which requires a bunch of bioconductor packages. I guess for now, my best solution is to divide my app into modules and load/unload packages as the user switch from one module to another. This brought me another question: it seems that unload package with the
2012 Dec 31
3
weird bug with parallel, RSQlite and tcltk
Hello, I spent a lot of a time on a weird bug, and I just managed to narrow it down. In parallel code (here with parallel::mclappy, but I got it doMC/multicore too), if the library(tcltk) is loaded, R hangs when trying to open a DB connection. I got the same behaviour on two different computers, one dual-core, and one 2 xeon quad-core. Here's the code: library(parallel) library(RSQLite)
2010 Nov 12
1
unloading compiled code.
I have a package that I'm developing that I need to unload the library. Long story short I figured out that the leaving the compiled code loaded lead to a segmentation fault, but unloading the code will fix it. I've read the documentation and it appears that there are several ways to do this? What is the popper accepted current standard for unloading compiled code? The options as I
2007 Jul 03
2
reinforce library to re-load
Hi, I am wondering if there is a parameter in library() so that it can reinforce package to be reloaded. It helps when you test your modified package by yourself. Otherwise, my way is to re-start Rgui. (by reading ?library, I understand this option is not implemented) "...Both functions check and update the list of currently loaded packages and do not reload a package which is already
2007 Jul 03
2
reinforce library to re-load
Hi, I am wondering if there is a parameter in library() so that it can reinforce package to be reloaded. It helps when you test your modified package by yourself. Otherwise, my way is to re-start Rgui. (by reading ?library, I understand this option is not implemented) "...Both functions check and update the list of currently loaded packages and do not reload a package which is already
2012 Jul 24
1
Finding dynamic shared libraries loaded with a package
Is there a way to query a package to see what dynamic shared libraries are loaded with it? The reason I ask is because during development, I want to unload libraries so that they can be reloaded without restarting R. I want to make it automatic so that you can just pass in the name of the package, and it will unload all the relevant shared libraries. Typically, the name of the shared library is
2004 Aug 23
1
Installing R on DEC Alpha - problems with dynamic loading
I have recently installed R on DEC Alpha OSF 5.1. The first regression test (reg-test-1.R) failed with an unresolved symbol in lapack.so: 2246839:/data/h1/bifdev/apps/wga/R-1.9.1/bin/R.bin: /sbin/loader: Fatal Error: call to unresolved symbol from /data/h1/bifdev/apps/wga/R-1.9.1/modules/lapack.so (pc=0x3ffbfe22b60) Further investigation has revealed that there is NO problem with lapack.so. The
2004 Aug 23
1
Installing R on DEC Alpha - problems with dynamic loading
I have recently installed R on DEC Alpha OSF 5.1. The first regression test (reg-test-1.R) failed with an unresolved symbol in lapack.so: 2246839:/data/h1/bifdev/apps/wga/R-1.9.1/bin/R.bin: /sbin/loader: Fatal Error: call to unresolved symbol from /data/h1/bifdev/apps/wga/R-1.9.1/modules/lapack.so (pc=0x3ffbfe22b60) Further investigation has revealed that there is NO problem with lapack.so. The
2013 Dec 19
2
Strange warnings when unloading packages with S4 classes
I've been seeing warnings when unloading packages. They can be seen with the shiny and sp packages, among others (this is on R 3.0.2). For example: > library(sp) > unloadNamespace('sp') Warning messages: 1: In FUN(X[[2L]], ...) : Created a package name, ‘2013-12-19 12:14:24’, when none found 2: In FUN(X[[2L]], ...) : Created a package name, ‘2013-12-19 12:14:24’, when none
2014 Nov 11
0
Should R Packages Unload Dynamic Libraries When They Unload?
>From Hadley's C best practices (http://r-pkgs.had.co.nz/src.html#c-best-practices): > Like with C++, whenever you use C code in your package, you should unload the DLL when the package is unloaded: .onUnload <- function (libpath) { library.dynam.unload("mypackage", libpath) } Writing R Extensions on the other hand doesn't even mention this (AFAIK). I
2012 Jan 27
2
Unable to reload Rdoc
Dear list, I'm hoping the R guru's can help with an error i've been getting for at least a year during active package development. I have a package loaded & spot a documentation bug, so I: edit the Rd file (or in the roxygen header + roxygenize); then R CMD BUILD, R CMD INSTALL then in the same R session, reload the library & lookup a man page, I always get this error: Error
2009 Jun 01
4
Recommendations for a quick UI.
Hi. This is my first post to this list, I seem to be graduating to from the r-help list. :-) I'm trying to wrap my R package in a GUI such that when the user launches the app, they see my GUI window and never interact with the R console at all. I don't have any fancy requirements for the GUI itself-- all it needs to do is collect input from the user and pass the input as arguments to
2013 Feb 02
1
best practice for packages using mclapply to avoid tcltk
Dear R-devel friends: I'm back to bother you again about the conflict between mclapply and tcltk. I've been monitoring several packages that want to use mclapply to parallelize computations and need to figure out what should be done. It appears tcltk cannot be safely unloaded, so the best we can do is check for the presence of tcltk and stop if it is found before mclapply() is used. I
2014 Nov 27
2
Problem understanding behaviour of versionCheck for loadNamespace (and when versions for Imports packages are checked)
Many thanks Duncan for the quick response. A bug is a relief in a way. I've been digging my way deeper into this (and learning more as I go) for several days now - but it is a diversion from (a diversion from) my main goal :-( Is there somewhere specific I should report or log the bug or will that happen from this mailing-list automatically? (I have seen the Bug Tracking link on the