# This script contains functions that will install and load the necessary packages for Metabolomics statisitcal app 0.1 #This function is responsible for installing R packages InstallRPackages<-function(){ packages <- c("xtable","ggplot2","shiny","rgl", "pca3d", "ellipse", "scatterplot3d","pls", "caret","lattice", "Cairo", "randomForest", "e1071","gplots", "som","RColorBrewer", "genefilter", "pheatmap") install.packages(packages,dependencies = TRUE) } #This function is responsible for instaling bioconducotr packages InstallBioPackages<-function(){ source("http://bioconductor.org/biocLite.R") #Bioconducotr packages biocLite(c("preprocessCore","xcms","impute","siggenes","sva", "ropls","RBGL","pcaMethods")) } #run these two lines to install all the packages #Note. these two lines of codes corresponds to the two fucntions declared above, #In order for these two lines of codes to work highlight the above script and select "run line or selected" InstallRPackages() InstallBioPackages() # These 2 lines of codes are required everytime to run the application it self. #Note the directory path of the "Metabolomics Statistics Analysis App 0.1.R" script must be enter #into the "runApp" function with all "\" replaced with "/". library(shiny) runApp("E:/Application/Metabolomics Statistics Analysis App 0.1.R")