-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathINSTALL_Rpack.R
More file actions
28 lines (28 loc) · 1.02 KB
/
Copy pathINSTALL_Rpack.R
File metadata and controls
28 lines (28 loc) · 1.02 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
library('remotes')
qrequire<-function(...) suppressWarnings(suppressPackageStartupMessages(require(...)))
require.and.load<-function(name,githubrep,force=FALSE) {
if (!qrequire(name,character.only=TRUE) || force) {
if (!missing(githubrep)) {
remotes::install_github(paste(githubrep,name,sep='/'),upgrade='always')
} else {
install.packages(name,repos='https://cloud.r-project.org/')
}
if (grepl('/',name) & !missing(githubrep)) {
name<-rev(strsplit(name,'/')[[1]])[1]
}
if (!qrequire(name,character.only=TRUE)) {
stop(paste("Failed to install package",name))
}
}
}
require.and.load('data.table')
require.and.load('plotrix')
require.and.load('Rfits','ASGR')
require.and.load('helpRfuncs','AngusWright')
require.and.load('kohonen/kohonen','AngusWright')
require.and.load('RColorBrewer')
require.and.load('KernSmooth')
require.and.load('itertools')
require.and.load('matrixStats')
require.and.load('argparser')
require.and.load('seqinr')