To answer more precisely on the request of @RobertMyles : take a look at the R Package PythonInR(available both on CRAN and GitHub).
It will allow you to submit a Python code to a Python Engine backend, and get the result.
Here, some of the most notable features :
- calling Python is as simple as calling a R Function
- arguments and return values are R objects
- prints are sent back to RStudio Console
- on the fly (bi-directional) conversion between R native data types & NumPy / Pandas ones (dataframes, vectors)
- you can submit a code in a form of a Python string (possibly templated)
- or a file script, a module, ...
- import a Python function as a R function
- PythonInR covers the entire Python FFI API (completeness)
It's so usefull in my everyday work, that I pray it will be maintained asis, open-source, never forked and everlasted on CRAN.
And don't forget that RStudio is very handy to edit Python files.