An execution context for R code
RContext
R6Class
In Stencila, a "context" is the thing that executes code for a particular programming language.
This is the context for R.
It implements the Context
API so that it can talk to other parts of the platform,
including contexts for other languages, Documents, and Sheets.
Create a new RContext
Currently the parameter closed
defaults to FALSE
so that you can use
library(somepackage)
to make a package available in subsequent calls to
runCode
or callCode
. In the future, it would be good to have a better machanism for that.
Context can not assign to the global environment. Default TRUE
Context can not read from the global environment. Default FALSE
Analyse R code and return the names of inputs, outputs and the implicitly returned vaue expression
R code to be analysed
Ensure that the code is a simple expression?
Run R code within the context's scope
R code to be executed
A list with a data pack for each input
Ensure that the code is a simple expression?