I'm using Roxygen2
to document my R (3.2.4) package and have several windows open as I fix my function @examples
:
1) R session where I type devtools::document()
to update the Rd
file
2) terminal window where I reinstall the package with the updated doc using
R CMD INSTALL myPackage
3) R session where I unload/reload the package and look at the updated documentation:
> detach(package:myPackage,unload=TRUE);require(myPackage)
> ?myTestFunc
The problem is in window 3. After running the detach()
and require()
, typing ?myTestFunc
gives me the following error:
Error in fetch(key) :
lazy-load database '/Library/Frameworks/R.framework/Versions/3.2/Resources/library/netDx/help/myTestFunc.rdb' is corrupt
In addition: Warning message:
In fetch(key) : internal error -3 in R_decompress1
Restarting R allows me to run ?myTestFunc
and see the updated documentation.
How do I unload and reload the package "completely" without having to start R each time?
Thanks for your time!
PS - some output from sessionInfo()
, incase it helps.
> sessionInfo()
R version 3.2.4 (2016-03-10)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.5 (Yosemite)