-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.R
More file actions
executable file
·95 lines (84 loc) · 4.67 KB
/
install.R
File metadata and controls
executable file
·95 lines (84 loc) · 4.67 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/usr/bin/Rscript
install.packages("devtools")
library(devtools)
ensure_package_installed <- function (package, repos = repos) {
if(!require(package, character.only=TRUE)) {
install.packages(package, repos = repos)
library(package, character.only=TRUE)
}
}
ensure_package_installed_with_version <- function (package, version, repos = repos) {
if(!require(package, character.only=TRUE)) {
install_version(package, version = version, repos = repos)
library(package, character.only=TRUE)
} else if (packageVersion(package) != version) {
install_version(package, version = version, repos = repos)
library(package, character.only=TRUE)
}
if(packageVersion(package) != version) {
stop("issue with: ", package, " ", version)
}
}
#
# ensure_package_installed("grDevices", repos = list("http://cran.rstudio.com/", "https://cran.ms.unimelb.edu.au/"))
# ensure_package_installed("devtools", repos = list("http://cran.rstudio.com/", "https://cran.ms.unimelb.edu.au/"))
#
# install.packages("githubinstall", repos = "http://cran.rstudio.com/")
# githubinstall::gh_install_packages("sjmgarnier/viridis", ask = FALSE)
#
# ensure_package_installed_with_version("rlang", "0.4.10",repos = "http://cran.rstudio.com/")
#
# ensure_package_installed("parallel", repos = "http://cran.rstudio.com/")
# ensure_package_installed("doParallel", repos = "http://cran.rstudio.com/")
# ensure_package_installed("GGally", repos = "http://cran.rstudio.com/")
# ensure_package_installed("gridExtra", repos = "http://cran.rstudio.com/")
# ensure_package_installed("rmarkdown", repos = "http://cran.rstudio.com/")
# ensure_package_installed("Hmisc", repos = "http://cran.rstudio.com/")
# ensure_package_installed("broom", repos = "http://cran.rstudio.com/")
# ensure_package_installed("FNN", repos = "http://cran.rstudio.com/")
# ensure_package_installed("R.utils", repos = "http://cran.rstudio.com/")
# ensure_package_installed("rmarkdown", repos = "http://cran.rstudio.com/")
# ensure_package_installed("corrplot", repos = "http://cran.rstudio.com/")
# ensure_package_installed("umap", repos = "http://cran.rstudio.com/")
# ensure_package_installed("ggpubr", repos = "http://cran.rstudio.com/")
# ensure_package_installed("stringi", repos = "http://cran.rstudio.com/")
#
# ensure_package_installed("bit64", repos = "http://cran.rstudio.com/")
# ensure_package_installed("snow", repos = "http://cran.rstudio.com/")
# ensure_package_installed("tinytex", repos = "http://cran.rstudio.com/")
#
# ensure_package_installed_with_version("data.table", "1.14.0",repos = "http://cran.rstudio.com/")
# ensure_package_installed_with_version("foreach", "1.5.1", repos = "http://cran.rstudio.com/")
# ensure_package_installed_with_version("stringr", "1.4.0", repos = "http://cran.rstudio.com/")
# ensure_package_installed_with_version("jsonlite", "1.7.2", repos = "http://cran.rstudio.com/")
# ensure_package_installed_with_version("plotly", "4.9.4.1", repos = "http://cran.rstudio.com/")
# ensure_package_installed_with_version("ggplot2", "3.3.5", repos = "http://cran.rstudio.com/")
# ensure_package_installed_with_version("knitr", "1.33", repos = "http://cran.rstudio.com/")
# ensure_package_installed_with_version("rmarkdown","2.9", repos = "http://cran.rstudio.com/")
# ensure_package_installed_with_version("FactoMineR", '2.4', repos = "http://cran.rstudio.com/")
# ensure_package_installed_with_version("factoextra", '1.0.7', repos = "http://cran.rstudio.com/")
# ensure_package_installed_with_version("testthat", '3.0.4', repos = "http://cran.rstudio.com/")
# ensure_package_installed_with_version("ggrepel", '0.9.1', repos = "http://cran.rstudio.com/")
# ensure_package_installed_with_version("Hmisc", '4.5-0', repos = "http://cran.rstudio.com/")
# ensure_package_installed_with_version("corrplot", '0.90', repos = "http://cran.rstudio.com/")
# ensure_package_installed_with_version("Rcpp", '1.0.7', repos = "http://cran.rstudio.com/")
# ensure_package_installed_with_version("RcppArmadillo", '0.10.6.0.0', repos = "http://cran.rstudio.com/")
#
#
# ensure_package_installed_with_version("readr", '2.0.0', repos = "http://cran.rstudio.com/")
#
# #### Install packages Bioconductor
# ensure_package_installed_with_version("BiocManager", '1.30.16', repos = "http://cran.rstudio.com/")
# BiocManager::install(c("Biobase", "limma", "qvalue"))
#
# biocManager_valid <- BiocManager::valid()
# if (typeof(biocManager_valid) == 'list'){
# BiocManager::valid()$out_of_date
# print(BiocManager::valid()$out_of_date)
# sessionInfo()
# stop("BiocManager is not valid")
# }
ensure_package_installed_with_version("BiocManager", '1.30.16', repos = "http://cran.rstudio.com/")
install.packages("renv")
renv::restore(library = '/usr/local/lib64/R/library/')
sessionInfo()