Tuesday, February 7, 2012

Reloading an updated R package without quitting R

Let us say that we worked on the source code of the package Cops and we would like to reload it  without quitting R

Re-install the package from Terminal 1 :
R CMD build Cops; sudo R CMD INSTALL Cops_1.2.tar.gz


Reload the modified package from the R session already running in  Terminal 2 :
detach(package:Cops,unload=T); library(Cops)

No comments:

Post a Comment