I more or less follow this guideline:
- Run
installr::updater()from../R-4.0.0/bin/x64/Rgui.exe(as suggested if you run it from RStudio) - Update all packages (check the "update all packages" box from
installr::updater()) - Change Windows system environment variable
R_LIBSin my case to..\R\R-4.0.x\library.
If I want to switch the R vesion from RStudio, I need to
- Set
Tools -> Global Options -> General -> R versionAND - change
R_LIBSto the correct place. (If you forget this,.libPaths()has more than one entry.)
So my questions are:
- Is that process correct? Do I miss anything?
- What about changing
Rtoolswhen switching between major R-versions, see e.g. here? - It seems
installr::updater()does not update the packages, although I check the "update all packages" box. (We observed that behaviour on two different laptops.) - It seems,
.Rprofile,.Renviron, andRprofile.siteplay a crucial role, see RStudio. Last time, everything worked fine,.Rprofileand.Renvironwere empty and I had to add the line.libPaths("path2/R-4.0.4/library")toRprofile.site. It seems you can useusethis::edit_r_profile()to finde those files.
Background: I had this question which was reproducible before I upgraded R to 4.0.2, but I realized, that after switching between
R 3.5.1, 4.0.0 and 4.0.2 back and forth for testing it is not reproducible anymore.
Thus I think, that my update-process was error-prone.