-
Notifications
You must be signed in to change notification settings - Fork 0
/
compile_all_pdfs.R
35 lines (24 loc) · 938 Bytes
/
compile_all_pdfs.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
rm(list = ls())
# Make sure that working directory is set to the location of this R script!
# i.e.
#setwd("C:/artificial_turf_predictive")
# needed R-packages
require(rmarkdown)
require(knitr)
require(data.table)
require(ggplot2)
require(cowplot)
require(rstan)
require(forecast)
# compile all .rmd files in the required order
rmarkdown::render("wrangle_data.Rmd",
output_format = "pdf_document", envir = new.env())
dir.create("FITS", showWarnings = FALSE)
rmarkdown::render("simulate_dynamic.Rmd",
output_format = "pdf_document", envir = new.env())
rmarkdown::render("fit_models.Rmd",
output_format = "pdf_document", envir = new.env())
rmarkdown::render("analyse_results.Rmd",
output_format = "pdf_document", envir = new.env())
rmarkdown::render("artificial_turf_predictive.Rmd",
output_format = "pdf_document", envir = new.env())