This repository was archived by the owner on Mar 18, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.R
More file actions
76 lines (69 loc) · 2.27 KB
/
setup.R
File metadata and controls
76 lines (69 loc) · 2.27 KB
1
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
## Install requirements
# install.packages("ggplot2")
# install.packages("GGally")
# install.packages("reshape2")
# install.packages("corrplot")
# install.packages("here")
# install.packages("pROC")
# install.packages("randomForest")
# install.packages("mgcv")
# install.packages("rpart")
# install.packages("mgcv")
# install.packages("reshape2")
# install.packages("mice")
# install.packages("missMethods")
# install.packages("transport")
# install.packages("philentropy")
# install.package("transport")
# install.packages("gridExtra")
# install.packages("ggExtra")
# install.packages("plotly")
# install.packages(" ks")
# install.packages("VIM") # (Visualization and Imputation of Missing Values)
# Inputation methods
# install.packages("mice")
# suppressMessages(library(mice))
# Other alternative
## Load requirements
suppressMessages(library(ggplot2))
suppressMessages(library(ggExtra))
suppressMessages(library(here))
suppressMessages(library(corrplot))
suppressMessages(library(reshape2))
suppressMessages(library(VIM))
suppressMessages(library(RColorBrewer))
suppressMessages(library(nord))
suppressMessages(library(GGally))
suppressMessages(library(rpart))
suppressMessages(library(mgcv))
suppressMessages(library(mice))
suppressMessages(library(missMethods))
suppressMessages(library(randomForest))
suppressMessages(library(philentropy))
suppressMessages(library(transport))
suppressMessages(library(gridExtra))
suppressMessages(library(MASS)) # For stepAIC
suppressMessages(library(plotly))
suppressMessages(library(dplyr))
suppressMessages(library(caret))
suppressMessages(library(stringr))
suppressMessages(library(cowplot))
# suppressMessages(library(ks))
# suppressMessages(library(caret))
# Load utilities using here()
source(here("src", "synthetic_data.R"))
source(here("src", "missing_data.R"))
source(here("src", "imputation_methods.R"))
source(here("src", "metrics.R"))
source(here("src", "plots.R"))
source(here("src", "utils.R"))
# Select Nord palettes
frost_palette <- nord("frost", 4)
aurora_palette <- nord("aurora", 4)
# Define some basic nord theme colors to use across the document
blue_nord <- frost_palette[[length(frost_palette)]]
red_nord <- aurora_palette[[1]]
green_nord <- aurora_palette[[3]]
nord_contrast = c(blue_nord, red_nord)
# Fixes the seed for reproducibility
set.seed(42)