I discovered today the very (very) cool packrat
R package to make your project reproducible.
However, when I use packrat
for my project by using packrat::resolve()
in Rstudio, the packages that need Rtools trigger a pop-up window asking me to install Rtools (while it is already install in "C:\rtools40"
). On the other hand, Rstudio is installed in "C:\Program Files\RStudio"
.
I tried to build this project on an other laptop and this problem doesn't appear (Rtools is installed the same and Rstudio is installed directly in C:\RStudio
).
This means that Rstudio doesn't find the rtools path on the first laptop.
Is it a common problem? Could it be linked to the Rstudio path?
For info:
> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)
Matrix products: default
locale:
[1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252 LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C LC_TIME=English_United Kingdom.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.0.2 bookdown_0.20 rsconnect_0.8.16 htmltools_0.5.0 tools_4.0.2 yaml_2.2.1 rmarkdown_2.5
[8] knitr_1.30 xfun_0.18 digest_0.6.27 rlang_0.4.8 evaluate_0.14
Cheers!
EDIT
It turns out that using the new alternative to packrat (renv) solves this problem.