In this short example, we're going to use R code cells and a range input to create an interactive plot of the famous (infamous?) mtcars data set as described in the R help:
The data was extracted from the 1974
Motor Trend
US magazine, and comprises fuel consumption and 10 aspects of automobile design and performance for 32 automobiles (1973–74 models).
The mtcars.source
directory includes a Markdown file with the text of the analysis and some code samples. As it is Markdown, you cannot execute these bits of code. However,
you can open this file in Stencila which will allow you to interact with the code.
Currently Stencila Desktop allows you to directly open only Dar (Reproducible Document Archive) format. You can use Stencila converter
in order to convert files from other popular formats (md
, Rmd
, ipynb
, tex
, odt
, html
, docx
) into dar
.
We already did this step for you, so if you don't want to deal with the conversion step, you can just download the examples
and open mtcars.dar
folder in Stencila Desktop.