[Rcpp-devel] How to detach a package completely
Dirk Eddelbuettel
edd at debian.org
Sat Aug 30 13:46:29 CEST 2014
On 30 August 2014 at 09:14, Cipollini Fabrizio wrote:
| From time to time, I use R to develop my own packages.
| For testing purposes, I need frequently
| ***to detach the previous version and attach a more recent built without
| leaving the R session***.
This has nothing to do with Rcpp.
The most reliable way is to ... start fresh sessions.
For which littler and Rscript are useful, so I something like the following
all the time: to test a given package, I load it (option -l or --packages,
takes a comma-sep. list) and exectute a function to test (option -e, or
--eval) via littler's r:
edd at max:~$ r -l RcppZiggurat -e 'print(zrnorm(5))'
[1] -1.1409054 0.8759027 -0.1969075 -0.1245053 0.2695581
edd at max:~$
Next time I run this I know I have a fresh session. RStudio reloads the
current session, and package, for you too.
Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
More information about the Rcpp-devel
mailing list