-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path05_install_packages.R
80 lines (67 loc) · 2.03 KB
/
05_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
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
# The aim of this code is to install the required packages
# with the version specified
# Package names
packages <- c("data.table",
"ggplot2",
"cowplot",
"readxl",
"knitr",
"stringr",
"here",
"magrittr",
"RColorBrewer",
"git2r",
"getPass",
"devtools",
"flextable",
"bookdown",
"viridis",
"rmarkdown",
"TTR",
"boot",
"VGAM",
"readr",
"writexl",
"Rfast",
"dvmisc",
"fastmatch",
"dplyr",
"plyr",
"openxlsx",
"mice",
"Hmisc",
"nnet",
"ggthemes",
"shiny",
"DT",
"shinythemes",
"ragg")
# Install packages not yet installed
installed_packages <- packages %in% rownames(installed.packages())
if (any(installed_packages == FALSE)) {
#install.packages(packages[!installed_packages], type = "source", INSTALL_opts = "--byte-compile")
install.packages(packages[!installed_packages], lib = project_lib)
#install.packages(packages[!installed_packages])
}
###########################
# STAPM packages
# Your gitlab username
uname <- ""
devtools::install_git(
"https://github.com/stapm/hseclean.git",
ref = "1.11.3",
build_vignettes = FALSE, lib = project_lib, quiet = TRUE)
#
# devtools::install_git(
# "https://gitlab.com/stapm/r-packages/tobalcepi.git",
# credentials = git2r::cred_user_pass(uname, getPass::getPass()),
# ref = "1.6.5",
# build_vignettes = FALSE, quiet = TRUE)
devtools::install_git(
"https://github.com/stapm/tobalcepi.git",
build_vignettes = FALSE, quiet = TRUE)
devtools::install_git(
"https://gitlab.com/stapm/r-packages/stapmr.git",
credentials = git2r::cred_user_pass(uname, getPass::getPass()),
ref = "1.9.3",
build_vignettes = FALSE, quiet = TRUE)