GitLab at IIASA

install.R 1.53 KiB
Newer Older
###########################################################################
###########################################################################
###                                                                     ###
###                             Installation:                           ###
###                INSTALL R PACKAGES FROM GITLAB, GITHUB               ###
###                                                                     ###
###########################################################################
###########################################################################

# Install R packages from Gitlab, Github.

# Install the released version of devtools from CRAN:
install.packages("devtools")

# Install the latest version of packages from Github
devtools::install_github("briatte/tidykml")
devtools::install_github("GAMS-dev/gdxrrw/gdxrrw")

# Install the latest version of packages from Gitlab
devtools::install_git("https://git-dmz.thuenen.de/mindstep/caprir.git")
devtools::install_git("https://git-dmz.thuenen.de/mindstep/capriv.git")

# load packages
requiredPackages = c('caprir', 'capriv', 'gdxrrw', 'usethis', 'hablar', 'tibble',
                     'networkD3', 'readxl', 'tidyr', 'dplyr','reshape2', 'data.table',
                     'plotly', 'gt', 'ggtext', 'rlang', 'Hmisc', 'webshot')
for(p in requiredPackages){
  if(!require(p,character.only = TRUE))install.packages(p)
  library(p,character.only = TRUE, quietly = TRUE)}

# set gams path, if necessary
gamsPath <- "D://gams//win64//24.9"
igdx(gamsPath)