Re: [Rd] unloadNamespace problem in 3.3

2016-05-10 Thread Martin Maechler
> Jeroen Ooms > on Tue, 10 May 2016 16:39:08 +0200 writes: > The following used to work in R 3.2.5 but not in 3.3.0: > library(MASS) > ns <-.getNamespace("MASS") > unloadNamespace(ns) or simply ns <- getNamespace("MASS") ;

[Rd] unloadNamespace problem in 3.3

2016-05-10 Thread Jeroen Ooms
The following used to work in R 3.2.5 but not in 3.3.0: library(MASS) ns <-.getNamespace("MASS") unloadNamespace(ns) Calling unloadNamespace("MASS") directly still works. __ R-devel@r-project.org mailing list

Re: [Rd] unloadNamespace

2015-01-09 Thread Gabriel Becker
Paul, In the version of R I had trivially available, the flushSession function from switchr seems to perform as expected when tseries is loaded. library(tseries) library(tseries) ‘tseries’ version: 0.10-32 ‘tseries’ is a package for time series analysis and computational finance.

Re: [Rd] unloadNamespace

2015-01-09 Thread Winston Chang
It's probably because the first thing that unloadNamespace does is this: ns - asNamespace(ns, base.OK = FALSE) If you call asNamespace(tseries), it calls getNamespace(tseries), which has the side effect of loading that package (and its dependencies). One way to work around this is to check

Re: [Rd] unloadNamespace

2015-01-09 Thread Paul Gilbert
Thanks Winston. That seems like a workaround that might be usefully included into unloadNamespace. Paul On 15-01-09 12:09 PM, Winston Chang wrote: It's probably because the first thing that unloadNamespace does is this: ns - asNamespace(ns, base.OK = FALSE) If you call

[Rd] unloadNamespace

2015-01-08 Thread Paul Gilbert
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

Re: [Rd] unloadNamespace

2015-01-08 Thread Gabriel Becker
Paul, My switchr package (https://github.com/gmbecker/switchr) has the flushSession function which does what you want and seems to work (on my test machine at least). I havent tested it under a recent Rdevel, or with that specific package, however I will soon, as the overarching model of switchr

[Rd] unloadNamespace, getPackageName and Created a package name xxx warning

2013-10-29 Thread Karl Forner
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

Re: [Rd] unloadNamespace, getPackageName and Created a package name xxx warning

2013-10-29 Thread John Chambers
This was previously reported and fixed. See the NEWS file and bug report 15481. On 10/29/13 9:19 AM, Karl Forner wrote: Dear all, Consider this code: library(data.table) unloadNamespace('data.table') It produces some warnings Warning in FUN(X[[1L]], ...) : Created a package name,

Re: [Rd] unloadNamespace (Was: How to unload a dll loaded via library.dynam()?)

2009-02-20 Thread Berwin A Turlach
G'day all, On Fri, 20 Feb 2009 04:01:07 + (GMT) Prof Brian Ripley rip...@stats.ox.ac.uk wrote: library.dynam.unload() does work if the OS is cooperative. And if you have your package set up correctly and unload the namespace (and not just detach the package if there is a namespace) then

Re: [Rd] unloadNamespace (Was: How to unload a dll loaded via library.dynam()?)

2009-02-20 Thread Prof Brian Ripley
This was rather a large shift of subject, so I've pruned the recipients list. Is lazy loading involved? If so I have an idea that may or may not be relevant. We do cache in memory the lazy-loading database for speed on slow (network-mounted or USB drive) file systems. Now the cache is

Re: [Rd] unloadNamespace (Was: How to unload a dll loaded via library.dynam()?)

2009-02-20 Thread Berwin A Turlach
G'day Brian, On Fri, 20 Feb 2009 11:37:18 + (GMT) Prof Brian Ripley rip...@stats.ox.ac.uk wrote: This was rather a large shift of subject, [...] Well, yes, from the clean unloading of compiled code to the clean unloading of R code. :-) Though, I also confirmed that the former is

[Rd] unloadNamespace inside .Last.lib

2006-09-28 Thread Benjamin Tyner
In my package's zzz.R, I put .Last.lib - function(libpath) { unloadNamespace(mypackage) } and I exported .Last.lib in NAMESPACE, with the intent that detaching the package would also cause the name space to be unloaded. However, the result of detach(package:mypackage) is then Error: