Skip to content

Commit

Permalink
auto-detect and install packages
Browse files Browse the repository at this point in the history
  • Loading branch information
adamthrash committed Mar 9, 2020
1 parent 5d51c8b commit cd95e44
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions app.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
## app.R ##
packages = c("PAST", "DT", "zip", "shiny", "shinydashboard", "gridExtra")
for (package in packages){
if( !is.element(package, .packages(all.available = TRUE)) ) {
if (package == "PAST"){
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("PAST")
} else {
install.packages(package)
}
}
library(package,character.only = TRUE)
}

library(PAST)
library(zip)
library(dplyr)
Expand Down

0 comments on commit cd95e44

Please sign in to comment.