global.R 1.23 KB
Newer Older
1
# Check if all required packages are installed, if not attempt to install the missing ones
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
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"])]
28 29 30 31 32 33 34

if (length(missing_packages)) {
  cat(paste(
    "Missing packages:",
    paste(missing_packages, collapse = ";"),
    "\nAttempting to install them."
  ))
35
  install.packages(missing_packages)
36
}
37 38

# Load modules
dmattek's avatar
dmattek committed
39
source('modules/auxfunc.R')
dmattek's avatar
dmattek committed
40
source('modules/selOutliers.R')
dmattek's avatar
dmattek committed
41
source('modules/downPlot.R')
dmattek's avatar
dmattek committed
42
source('modules/downCSV.R')
dmattek's avatar
dmattek committed
43
source('modules/dispStats.R')
dmattek's avatar
dmattek committed
44
source('modules/dispTrackStats.R')
dmattek's avatar
Mod:  
dmattek committed
45
source('modules/trajPlot.R')
dmattek's avatar
dmattek committed
46
source('modules/trajRibbonPlot.R')
47
source('modules/trajPsdPlot.R')
dmattek's avatar
dmattek committed
48 49
source('modules/aucPlot.R')
source('modules/distPlot.R')
dmattek's avatar
Mod:  
dmattek committed
50
source('modules/clDistPlot.R')
51
source('modules/tabScatter.R')
dmattek's avatar
dmattek committed
52 53
source('modules/tabDist.R')
source('modules/tabAUC.R')
dmattek's avatar
dmattek committed
54
source('modules/tabClValid.R')
dmattek's avatar
dmattek committed
55 56
source('modules/tabClHier.R')
source('modules/tabClHierSpar.R')