-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMake outputs.R
30 lines (22 loc) · 966 Bytes
/
Make outputs.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
# Define what you want
Orgs <- c("ESCO", "KLPN")
Exclude <- c("STAU", "STEP", "STCA")
Abx <- c("AMC", "AMX", "CIP", "GEN", "TRI")
Start <- as.Date("01/01/2022", format = "%d/%m/%Y") ## Enter this as dd/mm/YYYY
End <- as.Date("01/02/2022", format = "%d/%m/%Y") ## Enter this as dd/mm/YYYY
#### Nothing needs to be changed below here
save(Orgs, Exclude, Abx, Start, End, file ="output/data/params.Rdata")
html_output_name <- paste("Example Output", Sys.Date())
code_output_name <- "Example Output - R source code"
# Create output directories if they don't exist
if(!dir.exists("output/data")) {
dir.create("output/data", recursive = TRUE)
}
if(!dir.exists("output/results")) {
dir.create("output/results", recursive = TRUE)
}
# Make dataframe
source("scripts/format_data.R", local=new.env())
rmarkdown::render(input = "make_html.Rmd",
output_file = glue::glue("{html_output_name}.html"),
output_dir = "output/results")