Execute code within the the __main__
Python module.
py_run_string(code, local = FALSE, convert = TRUE)py_run_file(file, local = FALSE, convert = TRUE)
py_eval(code, convert = TRUE)
Code to execute
Whether to create objects in a local/private namespace (if
FALSE
, objects are created within the main module).
Boolean; should Python objects be automatically converted
to their R equivalent? If set to FALSE
, you can still manually convert
Python objects to R via the py_to_r()
function.
Source file
For py_eval()
, the result of evaluating the expression; For
py_run_string()
and py_run_file()
, the dictionary associated with
the code execution.