Skip to content

Template Repository for R Projects and Scripts

This is a template repository for modern R development with renv using R6 classes, validation with checkmate, logging with lgr, argument parsing with optparse, and a Shiny web app interface. Formatted with Air, linted with Jarl, and tested with testthat using GitHub Actions.

Checklist

You should go through the following steps when using this template:

  • Replace YOURUSERNAME and IMAGENAME in .github/workflows/docker-image.yml [or delete file].
  • Replace data in data with your own (test) data [or delete if you don't have data].
  • Adjust .gitattributes according to your needs [or delete file].
  • Adjust .gitignore according to your needs.
  • Setup your CITATION.cff according to your needs [or delete file].
  • Update attribution in Dockerfile and write image instructions, see also Docker.
  • Replace copyright name in LICENSE.
  • Update the main script in lib/main.R.
  • Delete example .R files in lib/ [and create your own].
  • Check if tests/testthat.R needs updating.
  • Write tests in tests/testthat/.
  • Document your code inline using roxygen2 style.
  • Document your code/script by writing a documentation page, see Documentation.
  • Adjust this README.md to your needs!

Released under the MIT License.