Stencila for R
Clone or download

Stencila for R

Build status Code coverage CRAN Community Chat


This package isn't on CRAN yet, but you can install it from this repository using the devtools package,


You may need to install the graph package from Bioconductor if you don't already have it:


Then install the package so that other Stencila packages and applications can detect it:


Note This package is not yet compatible with Stencila Desktop 0.28.0. We are working on upgrades to make that possible.

Note Installing Stencila package for R may take a while as there are a number of dependencies which need to be installed.


This package lets you run R code from inside Stencila Documents. When you start the Stencila Desktop it will be automatically detect the installed R package and you'll be able to execute R code cells from within your documents.

Check out what people are doing with Stencila and R - Giulio Valentino Dalla Riva has created Tiny Open Access Data Samples (TOADS). These awesome open datasets teach programming and statistics using Stencila. Check out the TOADS!

More documentation is available at


We love feedback. Create a new issue, add to existing issues or chat with members of the community.


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

Task make R/RStudio
Install development dependencies make setup
Run linting make lint lintr::lint_package()
Run tests make test devtools::test() or Ctrl+Shift+T
Run tests with coverage make cover covr::package_coverage()
Build documentation make docs
Check the package make check Ctrl+Shift+E
Build make build Ctrl+Shift+B
Clean make clean

To run test files individually, in R use test_file:


To get started, please read our contributor code of conduct, then get in touch or checkout the platform-wide, cross-repository kanban board, or just send in a pull request!

Unit tests live in the tests folder and are mostly written using testthat. Documentation is written using roxygen2 and the documentation site is generated by pkgdown into the docs folder and published on Github pages.

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