similar to: Possible bug or annoyance with library.dynam.unload()

Displaying 20 results from an estimated 4000 matches similar to: "Possible bug or annoyance with library.dynam.unload()"

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.
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
2013 Oct 29
1
unloadNamespace, getPackageName and "Created a package name xxx " warning
Dear all, Consider this code: >library("data.table") >unloadNamespace('data.table') It produces some warnings Warning in FUN(X[[1L]], ...) : Created a package name, ‘2013-10-29 17:05:51’, when none found Warning in FUN(X[[1L]], ...) : Created a package name, ‘2013-10-29 17:05:51’, when none found ... The warning is produced by the getPackageName() function. e.g.
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)
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
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
2009 Feb 19
1
How to unload a dll loaded via library.dynam()?
Hello. To save the hassle of quitting and restarting R every time I rebuild the package I'm working on (for the purposes of this question called "roots") I would like to write a script cleanly remove the package from my R session and then load it again. Of course detach("package:roots") works for the native R objects in the package. However, the compiled C library remains
2009 Feb 19
1
How to unload a dll loaded via library.dynam()?
Hello. To save the hassle of quitting and restarting R every time I rebuild the package I'm working on (for the purposes of this question called "roots") I would like to write a script cleanly remove the package from my R session and then load it again. Of course detach("package:roots") works for the native R objects in the package. However, the compiled C library remains
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 Mar 31
4
what is the preferred method to create a package local variable?
for the moment, I'm using: .onAttach <- function(libname, pkgname) { .bbg.db.conn <<- dbConnect(dbDriver("PostgreSQL"), user="blah","blah") } .onUnload <- function(libpath) { dbDisconnect(.bbg.db.conn) } which results in a hidden global variable in the global environment. I would prefer to make the assignment only in the package namespace.
2009 Dec 17
1
Error for making packages under windows XP-Error in library.dynam(lib, package, package.lib)
Hi, I have installed the necessary tools for making a R package under windows and am sure these tool have been correctly configured. I am very new to try writing a package, so the error may be very obvious for you. Forgive me if it is too easy. My package name is *stam*, and i put it under the folder "D:/StatSoft/R/MyPackage/". I have two folders,*R* and *man*. Besides, i also have
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
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
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
2004 Mar 10
2
R CMD check errors
Hello, I'm getting some error messages from R CMD check I can't deal with. I'm working under Linux with R 1.8.1 The package working directory can be found at: http://www.uni-bayreuth.de/departments/math/org/mathe7/DISTR/distr.tar.gz Here's the 00check.log produced by R CMD check distr * using log directory '/home/tom/studium/R/swp/swp/package/distr.Rcheck' * checking
2014 Jul 21
1
create R package include Fortran source code.
Hello, all I am building a R package using Fortran source code. The Fortran code is a subroutine. I can use "R CMD SHLIB bar.f -o bar.o" to create the shared library. For the R package, I put the fortran file in the src/ and I use R code as follows: ".First.lib"<-function(libname,pkgname){library.dynam("barpkg",pkgname,libname)} barfun<-function(n,x){