[R] unload & reload a (new version of a) package

From: Harte, Thomas P <THarte_at_tiaa-cref.org>
Date: Mon, 14 Jan 2008 18:48:46 -0500

i'm putting the final touches on a package that i'm developing and i noticed
that if i detach the package, and then re-build & re-install it (using R CMD)
then I can't get the newer version of the package to load in the existing R
session (i have to close it out and start a new session, then the newer version of the package is loaded).

looking through the source of 'detach' i see :

      .Call("R_lazyLoadDBflush", paste(libpath, "/R/", pkgname, 
            ".rdb", sep = ""), PACKAGE = "base")

is there some absolute way similar to the above to flush the package db and ensure that a newer version of the package can be loaded into the existing R session? detach calls .Last.lib and seems to go through the motions of purging the loaded package; why, then, is the package still lurking around in the existing R session?

it's not a big deal; it's only a minor pain having to re-start an R session.
i'm more interesting in why this is happening.



This message, including any attachments, contains confid...{{dropped:17}}

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 14 Jan 2008 - 23:52:43 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 15 Jan 2008 - 02:30:06 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive