Skip to content
Snippets Groups Projects
Commit 07fe334a authored by Ben Anderson's avatar Ben Anderson
Browse files

added stub for next fridayFun

parent 93ed2e6a
No related branches found
No related tags found
No related merge requests found
---
params:
subtitle: ""
title: ""
authors: ""
title: '`r params$title`'
subtitle: '`r params$subtitle`'
author: '`r params$authors`'
date: 'Last run at: `r Sys.time()`'
output:
bookdown::html_document2:
self_contained: true
fig_caption: yes
code_folding: hide
number_sections: yes
toc: yes
toc_depth: 2
toc_float: TRUE
bookdown::pdf_document2:
fig_caption: yes
number_sections: yes
bookdown::word_document2:
fig_caption: yes
number_sections: yes
toc: yes
toc_depth: 2
fig_width: 5
bibliography: '`r path.expand("~/github/dataknut/refs/refs.bib")`'
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(data.table)
```
# R packages used
* rmarkdown [@rmarkdown]
* bookdown [@bookdown]
* knitr [@knitr]
* data.table [@data.table]
# References
makeReport <- function(f){
# default = html
rmarkdown::render(input = paste0(here::here("2020_30_10_EPCs", f), ".Rmd"),
params = list(title = title,
subtitle = subtitle,
authors = authors),
output_file = paste0(here::here("docs/"), f, ".html")
)
# word
rmarkdown::render(input = paste0(here::here("2020_30_10_EPCs", f), ".Rmd"),
params = list(title = title,
subtitle = subtitle,
authors = authors),
output_file = paste0(here::here("docs/"), f, ".docx"),
output_format = "word_document"
)
}
# >> run report ----
rmdFile <- "carbonCosts" # not the full path
title = "What can EPC data tell us about the domestic cost of carbon?"
subtitle = ""
authors = "Ben Anderson"
makeReport(rmdFile)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment