Commit 7243c218 authored by majpark21's avatar majpark21

Added message with missing packages before install.

parent 070b4220
# Check if all required packages are installed, if not attempt to install the missing ones
required_packages = c("shiny", "shinyjs", "shinyBS", "shinycssloaders",
"data.table", "DT", "ggplot2", "gplots", "plotly",
"scales", "grid", "dendextend", "RColorBrewer",
"ggthemes", "sparcl", "dtw", "factoextra", "imputeTS",
"MASS", "robust", "pracma", "Hmisc")
missing_packages <- required_packages[!(required_packages %in% installed.packages()[,"Package"])]
if(length(missing_packages)) install.packages(missing_packages)
required_packages = c(
"shiny",
"shinyjs",
"shinyBS",
"shinycssloaders",
"data.table",
"DT",
"ggplot2",
"gplots",
"plotly",
"scales",
"grid",
"dendextend",
"RColorBrewer",
"ggthemes",
"sparcl",
"dtw",
"factoextra",
"imputeTS",
"MASS",
"robust",
"pracma",
"Hmisc"
)
missing_packages =
required_packages[!(required_packages %in% installed.packages()[, "Package"])]
cat(paste(
"Missing packages:",
paste(missing_packages, collapse = ";"),
"\nAttempting to install them."
))
if (length(missing_packages))
install.packages(missing_packages)
# Load modules
source('modules/auxfunc.R')
source('modules/selOutliers.R')
source('modules/downPlot.R')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment