[R] Using R and Python together

Kankana Shukla shukla.kank at gmail.com
Thu Mar 30 23:37:43 CEST 2017


Hello,

I am running a deep neural network in Python.  The input to the NN is the
output from my R code. I am currently running the python script and calling
the R code using a subprocess call, but this does not allow me to
recursively change (increment) parameters used in the R code that would be
the inputs to the python code.  So in short, I would like to follow this
automated process:

   1. Parameters used in R code generate output
   2. This output is input to Python code
   3. If output of Python code > x,  stop
   4. Else, increment parameters used as input in R code (step 1) and
   repeat all steps

I have searched for examples using R and Python together, and rpy2 seems
like the way to go, but is there another (easier) way to do it?  I would
highly appreciate the help.

Thanks in advance,

Kankana

	[[alternative HTML version deleted]]



More information about the R-help mailing list