University of Liverpool R Markdown Templates

2019-12-12 • One minute to read

Two R Markdown templates for use in assignments and dissertations/theses at the University of Liverpool. Template written primarily in LaTeX and packaged for use in R Markdown.


Repository Link


Installation

Install with:

devtools::install_github("cjber/uolrmarkdown")

If using RStudio:

New File -> R Markdown -> From Template -> UoL R Markdown

Otherwise for the article:

rmarkdown::draft(
  'index.Rmd', template = 'article',
  package = 'uolrmarkdown', create_dir = TRUE
)

and for the report:

rmarkdown::draft(
  'index.Rmd', template = 'report',
  package = 'uolrmarkdown', create_dir = TRUE
)

Example Images

Chapter Report Two Column Article

Customisation

Customisation of the knitr chunks can be accessed through template -> defaults.r. Here additional citations may be manually added if required e.g. QGIS. Additionally the default ggplot2 theme is set here.

scripts -> functions.r provides an example r script for loading in required packages and defining custom functions. I generally use source("./functions.r") with my scripts to prevent loading the required libs and functions each time.

The main bib file is given in bib/kbib.bib I use Zotero to generate bibtex.

For the article template for the written work only the main .Rmd needs editing, but in the chapter report each individual chapter should be edited separately.

For additional help with R Markdown see yihui.

Portfoliormarkdownlatextemplate

Agent Based Model: Liverpool Crime

Managing References in R Markdown and Rnoweb