-
Notifications
You must be signed in to change notification settings - Fork 5
/
install_R_packages.R
52 lines (47 loc) · 1.16 KB
/
install_R_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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# library or install.packages-----------------------------------------------------------------
packages = c(
"rstudioapi",
"plyr",
"dplyr",
'stringr',
"reshape2",
"data.table",
"Seurat",
"Matrix",
"optparse",
"bit64",
"Rtsne",
"Rmisc",
'devtools',
'readr',
'readxl',
'cowplot',
'roxygen2',
"ggplot2",
"RColorBrewer",
"ggrepel",
"ggthemes",
"Polychrome",
"ggrastr",
"circlize"
)
for (pkg_name_tmp in packages) {
if (!(pkg_name_tmp %in% installed.packages()[,1])) {
print(paste0(pkg_name_tmp, "is being installed!"))
install.packages(pkg_name_tmp, dependencies = T)
}
print(paste0(pkg_name_tmp, " is installed!"))
}
# install pkgs using BiocManager and library -----------------------------------------------------------
packages = c(
"ComplexHeatmap"
)
for (pkg_name_tmp in packages) {
print(paste0(pkg_name_tmp, "is being installed!"))
if (!(pkg_name_tmp %in% installed.packages()[,1])) {
BiocManager::install(pkgs = pkg_name_tmp, update = F)
}
print(paste0(pkg_name_tmp, " is installed!"))
}
# others ------------------------------------------------------------------
## install from https://www.xquartz.org/