r
R interpreter for executable documents
This project is deprecated and no longer maintained. At the time of writing, we are instead focussing on using tree-sitter
for sematic analysis, and IRKernel
for execution, of R code. Please see, our main repository, stencila/stencila
for further information.
This package isn't on CRAN yet, but you can install it from this repository using the devtools
package,
devtools::install_github("stencila/r")
You may need to install the graph
package from Bioconductor if you don't already have it:
source("https://bioconductor.org/biocLite.R")
biocLite("graph")
Then install the package so that other Stencila packages and applications can detect it:
stencila:::register()
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 https://stencila.github.io/r
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
:
library(testthat)
testthat::test_file(system.file("tests/testthat/test-r-context.R",package="stencila"))
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.
Thanks goes to these wonderful people (emoji key):
Aleksandra Pawlik π» |
Danielle Robinson π |
Achintya Rao π |
Daniel NΓΌst π» |
HarryZhu π |
Nokome Bentley π» |
---|
This project follows the all-contributors specification. Contributions of any kind welcome!