This repository has been archived by the owner on Feb 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrender_versions.R
20 lines (19 loc) · 1.62 KB
/
render_versions.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
rmarkdown::render('index.Rmd')
rmarkdown::render('data.Rmd', params = list(cache = FALSE, optimize = TRUE))
# rmarkdown::render('cases.Rmd', params = list(cache = FALSE, optimize = TRUE))
rmarkdown::render('classifications.Rmd', params = list(cache = FALSE, optimize = TRUE))
# rmarkdown::render('regressions.Rmd', params = list(cache = FALSE, optimize = TRUE))
# rmarkdown::render('panel.Rmd', output_file = "panel1995.html", params = list(cache = FALSE, optimize = TRUE, begin = 1995, end = 2015, incl_new = FALSE, set_title = "Panel Regressions (1995-2015)"))
# rmarkdown::render('panel.Rmd', output_file = "panel3lag.html", params = list(cache = FALSE, optimize = TRUE, lags = 3, incl_new = FALSE, set_title = "Panel Regressions (3 lags)"))
rmarkdown::render('panel.Rmd', params = list(cache = FALSE, optimize = TRUE))
# rmarkdown::render('panelold.Rmd', params = list(cache = FALSE, optimize = TRUE))
rmarkdown::render('sequences.Rmd', params = list(cache = FALSE, optimize = TRUE))
(files <- c('index', 'summary', 'data', 'cases', 'classifications', 'sequences', 'regressions', "panel1995", "panel3lag", 'panel'))
files <- paste(files, "html", sep = ".")
(files <- files[files %in% dir()])
folders <- c("site_libs", paste(stringr::str_replace(files, ".html", ""), "files", sep = "_"))
(folders <- folders[folders %in% dir()])
unlink(paste("docs/", dir("docs"), sep = ""), recursive = TRUE)
file.rename(files, paste("docs/", files, sep = ""))
file.rename(from = folders, to = paste("docs/", folders, sep = ""))
file.copy(from = c("links.js", "styles.css"), to = paste("docs/", c("links.js", "styles.css"), sep = ""), overwrite = TRUE, copy.date = TRUE)