We are using reticulate to call Python packages from R. I understand how to use it, but I need to understand how it is actually implemented at a process level on Linux. I looked at the code but could not immediately see how it is done.
I can see a few ways it could be implemented on Linux, for example:
- The R process uses popen to start a permanent Python process, and communicates via a pipe
- The R process starts a Python interpreter for each call, again using popen
- Rather than use pipes, they communicate via files.
I am asking these questions because I need to understand the performance implications, plus I have been asked to load an "R package" into our local CRAN service, only to discover that the R package is entirely Python called via Reticulate. How could the python be encapsulated in the R package?
Apologies if this is not the correct forum.
Thanks in advance