> 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") ; unloadNamespace(ns)
yes, indeed.
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 asNamespace("tseri
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.
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 chec
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
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, ‘201
G'day Brian,
On Fri, 20 Feb 2009 11:37:18 + (GMT)
Prof Brian Ripley 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 possible on a cooperative
O
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
flus
G'day all,
On Fri, 20 Feb 2009 04:01:07 + (GMT)
Prof Brian Ripley 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 the shared
> objec