pyExecg ======= The function pyExecg is designed to execute multiple lines of Python code and returns the thereby generated variables to R. The function pyExecg executes the code in a temporary namespace, after the execution every variable from the namespace is returned to R. If the mergeNamespaces is set to TRUE the temporary namespace gets merged with the (global) namespace __main__. The logical variable override is used to control, if already existing variables in the namespace __main__ should be overridden, when a variable with the same name get's assigned to the temporary namespace. If a python object can't be converted to an R object it is assigned to the Python dictionary __R__.namespace and the type, id and an indicator if the object is a callable are returned. Usage ----- .. code-block:: R pyExecg(code, returnValues = character(), autoTypecast = TRUE, returnToR = TRUE, mergeNamespaces = FALSE, override = FALSE, simplify = TRUE) Arguments --------- .. raw:: html
code | a string of Python code to be executed in Python. |
returnValues | a character vector containing the names of the variables, which should be returned to R. |
autoTypecast | a an optional logical value, default is TRUE, specifying if the return values should be automatically typecasted if possible. |
returnToR | an optional logical, default is TRUE, specifying if the generated variables should be returned to R. |
mergeNamespaces | an optional logical, default is FALSE, specifying if the internally generated temporary namespace should be merged with the name space __main__. See \bold{Details}. |
override | an optional logical value, default is FALSE, specifying how to merge the temporary namespace with the __main__ namespace. |
simplify | an optional logical, if TRUE (default) R converts Python lists into R vectors whenever possible, else it translates Python lists always to R lists. |