This package provides R bindings for the Stencila Schema. It is primarily aimed at R developers wanting to programmatically generate, or modify, executable documents. For example, it is used in rasta, an interpreter for executable documents containing R code.

Install

This package isn’t on CRAN yet, but you can install it directly from this repository using the remotes package,

remotes::install_github("stencila/schema", subdir = "r", upgrade = "ask")

Develop

Get started by cloning this repository,

Most development tasks can be run from R, using make shortcuts, or RStudio keyboard shortcuts.

Task make R/RStudio
Install development dependencies make setup
Regenerate R/types.R make regen
Run linting make lint lintr::lint_package()
Run tests make test devtools::test() or Ctrl+Shift+T
Re-run tests on changes make autotest testthat::auto_test_package()
Run tests with coverage make cover covr::package_coverage()
Build documentation make docs devtools::document()
Check the package make check Ctrl+Shift+E
Build the package make build devtools::build() or Ctrl+Shift+B
Clean make clean

Testing

Unit tests live in the tests folder and are written using testthat.

Documentation

Documentation is written using roxygen2 and the documentation site is generated by pkgdown into the docs folder and published on Github pages.

Continuous integration

Tests are run on Travis and code coverage tracked at Codecov.