When installing a Rcpp package on Windows, you need to ensure that the package DLL is unloaded or you get a “Permission Denied” error when copying the new DLL. This means restarting R on every recompile, which is pretty annoying. Is there any way to unload the package DLL without killing R?
I’ve tried the detach("package:my_package", force=TRUE) command, but it doesnt unload the DLL.
If you want to do this in your main R session (without using RStudio, which makes reinstalling the package and reloading R very easy), you can use devtools:
Among other things,
load_allwill reload all your R code, and re-compile and reattach the DLL.