Learn R Programming

rtemps

My personal favourite R templates for doing reproducible data analyses.

Available Themes

Install

From CRAN:

install.packages("rtemps")

Note that the package imports among others the libraries DT, ggplot2 and xfun.

Usage

Once the templates are installed, you can use them in 2 ways:

  1. Within the templates in RStudio (highly advised - easiest way):
  • File > New File > R Markdown... > From Template (United HTML Theme)
  • File > New Project... > New Directory > Bookdown Lite project (Bookdown Lite Theme)
  1. By calling the create_rtemp() function which allows you to create a new directory with all the template files inside, ready to be used/rendered.

Notes

United HTML Theme

  • To create and render the template from an R session, run:
rtemps::create_rtemp(dirname = "new-dir", template = "united_html")
rmarkdown::render(input = "new-dir/index.Rmd", output_format = "html_document", output_dir = "new-dir")

Bookdown Lite Theme

  • To create and render the template from the command line, run:
Rscript -e "rtemps::create_rtemp(dirname = 'new-dir', template = 'bookdown_lite')"
cd new-dir
./_build.sh
  • The output of the Bookdown Lite theme is placed under a docs directory, so that it can easily be rendered with GitHub Pages.
  • The Bookdown Lite can be easily converted to a multi-paged document by configuring the split_by property in the _output.yml template file (check the doc).

Copy Link

Version

Install

install.packages('rtemps')

Monthly Downloads

221

Version

0.8.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

John Zobolas

Last Published

November 4th, 2020

Functions in rtemps (0.8.0)

create_rtemp

Create a new directory with the specified R template