The %v is automatically expanded to the major and minor version of R, so with R 3.5.1 this path becomes ~/R/library/3.5. You can also alternatively set R_LIBS_USER to a different path but make sure to include the %v wildcard. R_LIBS_USER is actually set by default to this scheme, (to ~/R/win-library/x.y on Windows and ~/Library/R/x.y/library on macOS) but the directory may not already exist, so one option is just to create this directory ( fs::dir_create(Sys.getenv("R_LIBS_USER"))). You also want to make sure the package library is specific to the minor version of R. This makes it easy to re-install R if needed without touching your CRAN packages. I suggest you keep the packages R comes with (base and recommended) packages separate from the rest of your packages. While it may work some (even most) of the time, R-core does not guarantee compatibility between these versions and things could break (even break silently). R-4.3.0 for Windows Download R-4.3. You may see some suggestions that you can just copy your packages even when the ‘minor’ version changes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |