MyNixOS website logo
Description

R Templates for Reproducible Data Analyses.

A collection of R Markdown templates for nicely structured, reproducible data analyses in R. The templates have embedded examples on how to write citations, footnotes, equations and use colored message/info boxes, how to cross-reference different parts/sections in the report, provide a nice table of contents (toc) with a References section and proper R session information as well as examples using DT tables and ggplot2 graphs. The bookdown Lite template theme supports code folding.

rtemps

Travis build status CRAN status Downloads

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).
Metadata

Version

0.8.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows