-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpackages_bacteria.R
42 lines (38 loc) · 1.35 KB
/
packages_bacteria.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
#remove packages if they are present in lib
pkgrmTest <- function(x)
{
if (x %in% rownames(installed.packages()) == TRUE) {
remove.packages(x)
}
}
packagesRemove <- c("tibble", "tidyselect")
for (package in packagesRemove){pkgrmTest(package)}
#not installing taxize in order to use dev version
pkgTest <- function(x)
{
if (x %in% rownames(installed.packages()) == FALSE) {
install.packages(x, dependencies= TRUE,repos = "http://cran.us.r-project.org")
}
library(x, character.only = TRUE)
}
#installing curl before taxize
#removed "stringi", nope need that
#"glue" and "rlang" seem needed for dplyr, after deleting each from library manually
neededPackages <- c("data.table", "glue", "rlang","tibble", "tidyselect", "dplyr", "reshape2", "corrplot",
"RColorBrewer","curl", "taxize", "myTAI", "usethis", "stringr",
"naniar", "Hmisc",
"ggplot2",
"CHNOSZ", "stringi"
)
#"rstan"
for (package in neededPackages){pkgTest(package)}
#biocLite not available for this version of R
# install.packages("biocLite")
# library("biocLite")
# biocLite("biomaRt")
#requires biomaRt, which we can't install
# install.packages("biomartr")
# library("biomartr")
# devtools::install_github('TIBHannover/BacDiveR')
devtools::install_github("ropensci/taxizedb")
library(taxizedb)