knitr::opts_chunk$set( comment = "#>", tidy = FALSE, error = FALSE, fig.width = 8, fig.height = 8)
checkers is a framework for reviewing analysis projects. This package provides both automatied checks for best practises as well as a descriptive guide for best practices.
Our full, in-development analysis review guide is available here as a google doc. We categorize checks according to tiers of 'best practise' and potential degree of automation:
Example check 'best practices' in terms of their importance (y-axis) and the degree they can be automated (x-axis).
The checkers package runs automated tests, using extensions on the goodpractice package.
devtools::install_github('ropenscilabs/checkers')
Run gp_check()
on your analysis directory for a report on common best
practices for analysis directories.
library(checkers) gp_check(path=system.file("scripts", package="checkers"), checks=c("comments", "version_control"))
Helper functions allow one to create custom checks for common tasks. For
instance, make_pref_pkg_check()
defines a test for preferred packages. These
helpers are used with goodpractice's (in-development) API for extensions:
xml_check <- make_pref_pkg_check(unfavored = "XML", favored = "xml2") gp_check(path=system.file("scripts", package="checkers"), checks="xml", extra_preps = list(packages=prep_packages), extra_checks = list(xml=xml_check))
checkers has a growing list of default checks but may also be configured for personal or group preferences. A YAML file may be provided to set project-, user- or system-wide defaults for checks:
cat(paste(readLines(system.file("extdata", "default.yaml", package="checkers")), collapse="\n"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.