# Installieren von outdated Paketen update.packages(ask = FALSE) # Funktion zum Installieren von Paketen, falls diese noch nicht installiert sind install_missing <- function(pkgs) { inst_pkgs <- rownames(installed.packages()) pkgs <- pkgs[!pkgs %in% inst_pkgs] if (!length(pkgs)) { message("All packages are already installed.") } else { message(paste0("Installing packages:\n\"", paste0(pkgs, collapse = "\"\n\""), "\"\n")) for(i in pkgs) { install.packages(i) } } } # Graphiken und Statistiken ---------------------------------------------------- pkgs <- c("ggplot2", "dplyr", "tidyr", "readr", "readxl", "writexl", "readODS", "data.table", "lubridate", "stringr", "tibble", "RColorBrewer", "units", "reshape2", "plotly", "r2d3", "targets", "lme4", "nlstools", "params") install_missing(pkgs) # Literarisches Programmieren -------------------------------------------------- pkgs <- c("knitr", "rmarkdown", "tinytex", "quarto") install_missing(pkgs) # Datenbanken und Web Scraping ------------------------------------------------- pkgs <- c("DBI", "RPostgres", "RPostgreSQL", "httr2", "rvest", "jsonlite", "xml2") install_missing(pkgs) # GIS und Karten -------------------------------------------------------------- pkgs <- c("sf", "terra", "stars", "ggmap", "leaflet", "mapview", "osmdata", "geodata", "tidyterra", "rnaturalearth", "rnaturalearthdata", "cartogram", "sfnetworks", "lwgeom") install_missing(pkgs)