Created
February 28, 2018 16:15
-
-
Save chasemc/fc17bdd0b4914abca855efd5bb14ad6b to your computer and use it in GitHub Desktop.
Install some packages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!length(grep("mzR",row.names(installed.packages())))){ | |
if(!length(grep("BiocInstaller",row.names(installed.packages())))){ | |
source("https://bioconductor.org/biocLite.R") | |
biocLite("BiocInstaller",suppressUpdates = T) | |
} | |
source("https://bioconductor.org/biocLite.R") | |
biocLite("mzR",ask=F) | |
} | |
# Function to Install and Load R Packages | |
Install_And_Load <- function(Required_Packages) | |
{ | |
Remaining_Packages <- | |
Required_Packages[!(Required_Packages %in% installed.packages()[, "Package"])] | |
if (length(Remaining_Packages)) | |
{ | |
install.packages(Remaining_Packages) | |
} | |
for (package_name in Required_Packages) | |
{ | |
library(package_name, | |
character.only = TRUE, | |
quietly = TRUE) | |
} | |
} | |
# Required packages to install and load | |
Required_Packages = c("devtools","svglite","shinyjs", "mzR","plotly","colourpicker","shiny", "MALDIquant", "MALDIquantForeign","readxl","networkD3","ape","FactoMineR","dendextend","networkD3","reshape2","plyr","igraph") | |
# Install and Load Packages | |
Install_And_Load(Required_Packages) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment