REvaluator | R Documentation |
Evaluate an R-language expression in open-source R, in \TERR, or in the currently-running R-language interpreter. Returns the result to the currently-running interpreter.
LocalEvaluator(expr, substitute = TRUE, data = NULL, envirData = parent.frame(), verbose = FALSE, showTextOutput) TERREvaluator(expr, substitute = TRUE, data = NULL, envirData = parent.frame(), verbose = FALSE, showTextOutput = FALSE) REvaluator(expr, substitute = TRUE, data = NULL, envirData = parent.frame(), verbose = FALSE, showTextOutput = FALSE) REvaluate(expr, REvaluator. = RinR::REvaluator, substitute = TRUE, data = NULL, envirData = parent.frame(), verbose = FALSE, packages = character(), ...)
expr |
an expression to be evaluated in the given R intepreter. |
substitute |
a logical value.
|
data |
if
|
envirData |
an environment. If |
verbose |
a logical value. If |
REvaluator. |
an |
packages |
A character vector (or NULL) giving the names of the packages to load
before evaluating |
showTextOutput |
A logical value. If |
... |
|
|
return
the value of the the evaluated expression,
placed in a list (of length 1) with |
|
returns the value of the the evaluated expression
in the given R interpreter. If an error occurs while that interpreter tries
to evaluate the expression, |
The LocalEvaluator
evaluates the expression in the global environment
of the currently-running R interpreter. Assignments made in the course of
evaluating the expression or copying the data object affects the global environment.
multiREvaluator
evaluates the same expression in several
interpreters.
RCompare
calls multiREvaluator
and compares the results
by calling all.equal
on them.
The open-source R and \TERR evaluators are constructed by makeREvaluator
.
These are default evaluators containing only the name of the interpreter,
not the path to them. Call pushPATH
to add the directory containing
the interpreter's executable to the system PATH
variable.
RCompare
,
RGraph
,
pushPATH
,
multiREvaluator
,
makeREvaluator
.
## Not run: REvaluate(version$version.string, LocalEvaluator) REvaluate(version$language, REvaluator) REvaluate(version$language, TERREvaluator) REvaluate(log2(p), TERREvaluator, data=list(p=16:32)) p <- 60:67 REvaluate(log2(p), REvaluator, data="p") REvaluate({ cat("Hello from subprocess\n"); 1+2+3}) REvaluate({ cat("Hello from subprocess\n"); 1+2+3}, showTextOutput=TRUE) polrFit <- REvaluate({library(MASS) ; polr(voice.part ~ height, sng)}, data = list(sng = Sdatasets::singer)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.