This repository has been archived by the owner on Sep 13, 2021. It is now read-only.
forked from rocker-org/rocker-versioned2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_packages.R
31 lines (19 loc) · 1.57 KB
/
install_packages.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
args = commandArgs(trailingOnly=TRUE)
auth <- args[1]
namespace_packages_stats <- c("car", "coxme", "DescTools", "emmeans", "exact2x2",
"lme4", "lmerTest", "mice", "rpact", "survminer")
namespace_packages_util <- c("ggpubr", "viridisLite", "RColorBrewer", "xtable", "flextable", "kableExtra", "here")
validation_packages <- c("mitml", "optimx", "Exact", "dfoptim", "broom.mixed", "lmtest", "kinship2", "mnormt", "shiny")
pkg_list <- c(namespace_packages_stats, namespace_packages_util, validation_packages)
devtools::install_github("https://github.com/imbi-heidelberg/DescrTab2")
devtools::install_github("https://github.com/imbi-heidelberg/imbiReport", auth_token = auth)
devtools::install_github("https://github.com/pharmaR/riskmetric")
install.packages(pkg_list, dependencies=NA, repos="cran.r-project.org", upgrade=F)
# withr::with_libpaths("/usr/local/lib/R/site-library", devtools::install("/home/rstudio/pkgs/DescrTab2", dependencies=NA, repos="cran.r-project.org", upgrade=F))
# withr::with_libpaths("/usr/local/lib/R/site-library", devtools::install("/home/rstudio/pkgs/imbiReport2", dependencies=NA, repos="cran.r-project.org", upgrade=F))
# withr::with_libpaths("/usr/local/lib/R/site-library", devtools::install("/home/rstudio/pkgs/riskmetric", dependencies=NA, repos="cran.r-project.org", upgrade=F))
sink(paste0("/R-", paste(R.Version()$major, R.Version()$minor, sep = "."), "/logs/installed_packages.log"))
options(width=9999, max.print = 99999)
installed.packages()
sink()
saveRDS(installed.packages(), "/home/rstudio/pkgs/installed_packages.rds")