r_install.R 1.7 KB

1234567891011121314151617
  1. ## If a package is installed, it will be loaded. If any
  2. ## are not, the missing package(s) will be installed
  3. ## from CRAN and then loaded.
  4. ## First specify the packages of interest
  5. packages = c('leaflet', 'MuMIn', 'intervals', 'spacetime', 'gstat', 'automap', 'reporttools', 'rgeos', 'RandomFieldsUtils', 'RandomFields', 'rworldmap', 'colorRamps', 'mapdata', 'mapproj', 'RPostgreSQL', 'getPass', 'stringdist', 'here', 'svMisc', 'networkD3', 'nzelect', 'wordcloud', 'ngram', 'rtweet', 'xgboost', 'rts', 'RgoogleMaps', 'packrat', 'rsconnect', 'rpostgis', 'aws.signature', 'aws.s3', 'geosphere', 'fuzzyjoin', 'refinr', 'x13binary', 'seasonal', 'mitools', 'survey', 'sysfonts', 'showtextdb', 'showtext', 'BiocManager', 'rvcheck', 'scatterpie', 'rlist', 'measurements', 'qpdf', 'fda', 'fda.usc', 'gstat', 'countrycode', 'itcSegment', 'owmr', 'rwunderground', 'corrplot', 'prettymapr', 'prospectr', 'rpart.plot', 'varhandle', 'expint', 'actuar', 'psych', 'plotly', 'spatstat', 'raster', 'treemap', 'ggmap', 'hts', 'thief', 'forecastHybrid', 'ggseas', 'colourpicker', 'profvis', 'jsonlite', 'readxl', 'tidyverse', 'data.table', 'lubridate', 'stringi', 'snakecase', 'Matrix', 'RSelenium', 'devtools', 'ggplot2', 'metR', 'shinyFiles', 'shinyhelper', 'shinycssloaders', 'shinyWidgets', 'shinyBS', 'svglite', 'rworldxtra', 'parallel', 'gdtools', 'mapview', 'RNetCDF', 'clhs', 'cmsaf', 'RPostgres', 'satellite')
  6. ## Now load or install&load all
  7. package.check <- lapply(
  8. packages,
  9. FUN = function(x) {
  10. if (!require(x, character.only = TRUE)) {
  11. install.packages(x, repos='https://www.freestatistics.org/cran/', lib='/opt/easybuild/soft/2021b/software/ELIC_R/1-foss-2021b')
  12. library(x, character.only = TRUE)
  13. }
  14. }
  15. )