I am a fairly new user of R and have started using Emacs Speaks Statistics (ESS). I also use rpy2 (a python interface to R) where I can start an R-process in my ipython shell running in Emacs.
Is it possible to let ESS and rpy2 somehow share the same R process so that I could do a little bit coding in Python/rpy2 to set up some R objects, then switch to ESS and run R commands directly without using python/rpy2?
For example, I would either start R within Emacs using M-x R
, and then in my ipython session let rpy2.robjects.r
point to or use this running R process; or alternatively I would start R in python with rp2.robjects.r
and then get ESS to connect to the python-embedded R process.
I guess the problem is that the R process in rpy2 is embedded in the python interpreter, and also that the python objects representing R objects would become "out of sync" if I could manipulate R directly without going through rpy2? I acknowledge I don't have complete insight into how rpy2 and Emacs process-handling works...