I am developing a package and I want to be able to load an updated 
version of the package from within an active R session.  Suppose, for 
example, I have a function f within a package X.  In my active R 
session, I have already loaded X.  Then I change the R source code of f 
within X and rebuild the package as a .tar.gz file on the command line with

   R CMD build X

Within my R session, is there a way to reload X such that the updated 
definition of f will be used?  I have tried:

   > detach("package:X")
   > install.packages("X.tar.gz", repos=NULL, type="source")
   > library(X)

but this seems to use the old version of f.  Any suggestions would be 
much appreciated!

Many thanks in advance!

Roger

______________________________________________
R-help@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.

Reply via email to