I started to use reticulate to integrate R and python and I think it is great. Unfortunately I am having a problem and I think it is probably something I am doing wrong.
I have a R script
in my_python_script.py (python 3*) I am calling other scripts using
I get the error: NameError: name 'xxx' is not defined.
'xxx' is changing, sometimes it is at the beginning of the script, but if I am running some lines of the script using repl_python(), then the error is moving down the line(s).
To me it seems it does not always parse the whole file when exec is used. Is this a possibility? any workaround, beside rewriting the code to source everything from R instead of using exec into python scripts?
Thanks a lot and please let me know if you need further information