Description Usage Arguments Details Examples
The function pyExec allows to execute multiple lines of python code from within R.
1 | pyExec(code)
|
code |
a string of Python code to be executed in Python. |
Since pyExec can execute multiple lines, it is the obvious choice for defining Python functions or running small scripts where no return value is needed.
1 2 3 4 5 6 7 | pyExec('
print("The following line will not appear in the R terminal!")
"Hello" + " " + "R!"
print("NOTE: pyExecp would also show the line above!")
print("The following line will appear in the R terminal!")
print("Hello" + " " + "R!")
')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.