-
-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathmain_script.R
49 lines (38 loc) · 1.05 KB
/
main_script.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
#!/usr/bin/env Rscript
#
# main_script.R
# ---------------------------------------------------------
# This is the ASB tutorial master R script, the main
# entry point for running this tutorial in R. You will
# not need to modify this file.
#
# Use "Source with Echo" to run this script in its
# entirety in RStudio.
#
# Install ggplot package if missing
if ('ggplot2' %in% rownames(installed.packages()) == F){
install.packages('ggplot2')
}
library(ggplot2)
# Import subscript objects
for (i in seq(1, 5)) {
fn <- paste0('R_scripts/script_', i, '.R')
source(fn)
}
canvas <- ggplot(NULL) +
theme(axis.title=element_blank(),
axis.text=element_blank(),
axis.ticks=element_blank(),
panel.background=element_blank(),
panel.grid=element_blank())
# Implement script_1.R
canvas <- drawPeach(canvas)
# Implement script_2.R
canvas <- drawLeaf(canvas)
# Implement script_3.R
canvas <- drawStemAndHalo(canvas)
# Implement script_4.R
canvas <- drawASBLogo(canvas)
# Implement script_5.R
canvas <- drawSubtitle(canvas)
canvas