Use External R Packages

Packages installed in RStudio will persist until the app is restarted, while packages installed in R jobs will disappear after each run. In both cases, it is recommended to save the code used and run it each time.

In this way, if the packages you want to use are not available on Saagie, install them using the following lines of code:

pcks <- c('DBI', 'odbc', 'dplyr', 'dbplyr', 'getPass') # The list of package dependencies.
for (pck in pcks[pcks %in% installed.packages()]) install.packages(pck) # To install the package dependencies if required.

This checks if your package is installed, and if not, installs it.