View source: R/pythonInterface.R
RPython | R Documentation |
Returns an evaluator for the Python interface. Starts one on the first call, or if arguments are provided;
providing argument .makeNew = TRUE
will force a new evaluator. Otherwise, the current evaluator is
returned.
RPython(...)
... |
arguments to control whether a new evaluator is started. Normally omitted. |
See PythonInterface
for details of the evaluator.
if(okPython(TRUE)) {
ev <- RPython()
xx <- ev$Eval("[1, %s, 5]", pi)
xx
xx$append(4.5)
ev$Command("print %s", xx)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.