-
Notifications
You must be signed in to change notification settings - Fork 3
/
f - download_packages.R
49 lines (41 loc) · 1.66 KB
/
f - download_packages.R
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
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
######################################### DOWNLOAD AND LOAD PACKAGES ########################################
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Purpose: This function installs and loads the packages
#
# Inputs: None
#
# Outputs: loaded packages for this project
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
download_packages <- function()
{
# Create vector of packages to install for this project
packages_to_install <- c("tidyverse",
"usefun",
"sjlabelled",
"magrittr",
"ggplot2",
"gtsummary",
"compareGroups",
"flextable",
"dichromat",
"pheatmap",
"corrplot",
"broom",
"survey",
"ggrepel",
"rstatix",
"gt",
"colorspace",
"ggpubr")
# Install the packages
install.packages(packages_to_install)
# Load the packages
for (pkg in packages_to_install) {
library(pkg, character.only = TRUE)
}
rm(pkg)
library(devtools)
install_github("jokergoo/ComplexHeatmap")
print("packages loaded")
}