This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Please note there's a considerable downside to installing all PIK-PIAM packages, as opposed to just the | |
# packages you need: Not only the PIK-PIAM packages you don't actually use, but also their (recursive) | |
# dependencies, are unnecessarily updated every time you update packages. If you still want to continue | |
# you can run the following line without the leading '#' in R to install all PIK-PIAM R packages: | |
# source("https://gist.githubusercontent.com/pfuehrlich-pik/0b91022d5599831ee29fd7fe416332fb/raw/givemeall.R") | |
# see https://pik-piam.r-universe.dev/ui#builds for a list of the packages | |
local({ | |
installIfMissing <- function(packages, installFunc) { | |
missingPackages <- Filter(x = packages, f = function(x) !requireNamespace(x, quietly = TRUE)) |