Displaying 20 results from an estimated 2000 matches similar to: "library.dynam.unload"
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,
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
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]
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.
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
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
2004 Jun 04
1
[Wish]: Add "..." argument to library function
Hello,
I would find it very usefull to have the ability to load packages with options.
Consider for example the SciViews package Philippe and me are working on.
When loading on Windows, it automatically loads the associated GUI
executable. It should be convenient to have an option not to load the exe
but still have an access to the R functions of the package.
For that, I think a simple change
2006 Dec 09
2
Rcmdr package
Dear R users,
I want to install the Rcmdr package in a Quantian linux machine, but, when i
tried that, following commands appeared:
** building package indices ...
* DONE (Rcmdr)
The downloaded packages are in
/tmp/RtmpuOikyk/downloaded_packages
> library("Rcmdr")
Loading required package: tcltk
Error in firstlib(which.lib.loc, package) :
Tcl/Tk support is not
2003 Mar 03
1
How to change the default library directory?
I installed SJava package at $R_HOME/lib/R/library/
When I conduct library(SJava), I always need to explicitly specify the
library path, how could I change the default library path?
I have included the SJava path in the LD_LIBRARY_PATH variable as:
%echo $LD_LIBRARY_PATH
R_HOME/lib/R/library:R_HOME/lib/R/library/SJava/libs:/usr/java/j2sdk1.4.0_01/jr$
The result in R is as:
2009 Jul 06
1
Starting R Commander doesn't work (PR#13806)
Full_Name: Noyb
Version: 2.9.1
OS: Ubuntu 9.04
Submission from: (NULL) (141.53.34.152)
Hello,
I installed the GUI R Commander and tried to open it out of R by
> library("Rcmdr").
The following message occurred:
"Lade n?tiges Paket: tcltk
Error in firstlib(which.lib.loc, package) :
Tcl/Tk auf diesem System nicht verf?gbar
Fehler: Paket 'tcltk' konnte nicht geladen
2008 Apr 24
4
Scriptaculous Help (page exit effects)
I was wondering if it was possible in Prototype/Scriptaculous to run
an effect when a link is clicked, then go to that page, or if it was
possible to have an effect run when the page unloads.
I have tried <body onunload="new Effect.Fade("whatever");> and some
prototype page exit events, could get a alert("") function to work,
but not the effects. Any ideas?
2024 Mar 11
2
Vignettes with long compute time
Is there a way to include the compiled version of a vignette in the doc directory but mark
it to NOT be rerun by CRAN??? I think I remember that this is possible, but have forgotton
how.?? (It might even be a false memory.)
Terry T.
Background:? Beth Atkinson and I are splitting out many of the vignettes from the survival
package into a separate package survivalVignettes.? There are a few
2008 Mar 12
1
gracefully handing a library load error
I have an R program I am attempting to use to generate some SVGs. I've been
using the cairoDevice library. When running a session not connected to an X
session (like if I'm sshed in), attempting "library(cairoDevice)" causes:
*** caught segfault ***
address 0x8, cause 'memory not mapped'
Traceback:
1: .C("R_gtk_setEventHandler", PACKAGE =
2004 Oct 19
2
pb with aws package
Dear all,
[I work with a Windows XP Prof. installation, and the 2.0.0 R version]
I need to use the aws package, but I have the following error message:
> require(aws)
Loading required package: aws
Error in firstlib(which.lib.loc, package) :
couldn't find function "lazyLoad"
[1] FALSE
I download the .zip file (for Windows) today on the CRAN site, so I think I
have
2007 Apr 26
2
tcltk support....
Rusers,
library(Rcmdr)
Loading required package: tcltk
Error in firstlib(which.lib.loc, package) :
Tcl/Tk support is not available on this system
While installing R I run configure with
configure --prefix=/bla/bla --with-tcltk
make
make install
configure did not returned any errors. Hence, I assume that the the tcl/tk
libraries have been found.
installin.packages("tcltk")
2002 Sep 23
3
Problems with tcltk package
Hello listers,
I have installed Tcl/Tk v8.4 on my system (Win XP, R 1.5.1). When I try to
load the Tcl/Tk package I get this error:
> library(tcltk)
Error in firstlib(which.lib.loc, package) :
TCL_LIBRARY is not set
Error in library(tcltk) : .First.lib failed
Can someone help me, please?
Thanks,
Juan
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
2009 Nov 30
2
Ubuntu tcl/tk problems
Error in firstlib(which.lib.loc, package) :
Tcl/Tk support is not available on this system
Error : package 'tcltk' could not be loaded
Ubuntu 9.10
I have both the 8.5 and 8.4 tcl and tk regular and dev libraries
installed. I need both of these because some of my GIS software
requires the 8.4 libraries. Should I remove the 8.5 libraries, or ...
All help is greatly appreciated!
2003 Feb 05
3
tcltk installation problem
Dear all,
I want to use GraspeR (on R 1.6.0) and have to install tcltk library. When
I try to do this, I get back this error message:
Error in firstlib(which.lib.loc, package) :
TCL_LIBRARY is not set
Error in library(pkg, character.only = TRUE) :
.First.lib failed
But I have a tcl/tk package (Active TCL 8.4.1.0) correctly install on my PC
(Win95) and in the autoexec.bat the
2002 Oct 03
1
Newbie Q: Help with loading libraries in Mac OS X
I am trying to load two libraries (mclust and tcltk) in Mac OS X (10.1.5).
My R version is 1.5.1
I have tried both the Carbon version and the Darwin command line version =,
but I get the following errors:
IN DARWIN:
> library(mclust)
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library
"/usr/local/lib/R/library/mclust/libs/mclust.so":
2007 Nov 28
0
7 commits - configure.ac libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_sprite_movie.c test/trace
configure.ac | 7 ++-
libswfdec/swfdec_movie.c | 57 ++++++++++-----------------
libswfdec/swfdec_movie.h | 3 -
libswfdec/swfdec_sprite_movie.c | 4 -
test/trace/Makefile.am | 18 ++++++++
test/trace/remove-child-onUnload-5.swf |binary