-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_deps.R
53 lines (49 loc) · 1.21 KB
/
install_deps.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
# Ensure deps are installed
# START
user.input <- readline('WARNING: this script will automaticaly install packages.
Are you sure you want to continue? (y/n) ')
if (user.input != 'y') {
stop ('Execution halted')
}
# GET INSTALLED PACKAGES
packages <- installed.packages ()[ ,1]
# CHECK AND INSTALL
counter <- 0
if (!'ape' %in% packages) {
install.packages('ape')
counter <- counter + 1
}
if (!'plyr' %in% packages) {
install.packages('plyr')
counter <- counter + 1
}
if (!'geiger' %in% packages) {
install.packages('geiger')
counter <- counter + 1
}
if (!'caper' %in% packages) {
install.packages('caper')
counter <- counter + 1
}
if (!'ggplot2' %in% packages) {
install.packages('ggplot2')
counter <- counter + 1
}
if (!'devtools' %in% packages) {
install.packages ('devtools')
counter <- counter + 1
}
if(!'MoreTreeTools' %in% packages) {
devtools::install_github('DomBennett/MoreTreeTools', branch='edbmm')
counter <- counter + 1
}
if(!'treeman' %in% packages) {
install.packages('treeman')
counter <- counter + 1
}
if(!'R.utils' %in% packages) {
install.packages('R.utils')
counter <- counter + 1
}
# END
cat ('\nComplete! Installed [', counter, '] packages.', sep = '')