Skip to content

Instantly share code, notes, and snippets.

View pfuehrlich-pik's full-sized avatar

Pascal Führlich pfuehrlich-pik

View GitHub Profile
@pfuehrlich-pik
pfuehrlich-pik / givemeall.R
Last active October 26, 2022 13:07
install all pik-piam R packages
# 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))