devtools::install(local=TRUE) always re compiles?

The vignette for creating a package that depends on RStan says that :

If you only made a small change to the R code or the documentation, you can set local=TRUE to speed up the process

Alas, when I run devtools::install(local=TRUE) after making a change only to my R code all my stan code gets recompiled. Is this a bug or am I doing something wrong?

You can use devtools::document() to recompile the R side of the code: this should not trigger a recompilation (you can use devtools::clean_dll() followed by devtools::load_all() to recompile the Stan/C++ code without installing the package).

1 Like