Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>My personal experience has been with <code>Rpy</code>, not <code>Rpy2</code>. I used it for a while, but dropped it in favor of using <code>system</code> commands. A typical case for me was running a FORTRAN model using Python scripts, and post-processing with R. In my experience the easiest solution was to create a command line tool using R, which is quite straightforward (at least under Linux). The command line tool could be executed in the root of the model run, and the script would produce a set of R objects and plots in an <code>Routput</code> directory. The advantage of disconnecting R and Python in this way was that I could easily debug the R code separate from the Python code.</p> <p>I think <code>Rpy</code> really shines when a lot of back and forth communication between R and Python is needed. But if the functionality is nicely separable, and the overhead of disk i/o is not too bad, I would stick to <code>system</code> calls. See <a href="http://stat.ethz.ch/R-manual/R-patched/library/base/html/system.html" rel="nofollow"><code>?system</code></a> for more information regarding system calls, and <a href="http://stat.ethz.ch/R-manual/R-patched/library/utils/html/Rscript.html" rel="nofollow"><code>Rscript</code></a> for running R scripts as a command line tool.</p> <p>Regarding your wish to write R code in a Python way, this is not possible as all the solutions require you to write R code in R syntax. For <code>Rpy</code> this means R syntax, but a little different (no <code>.</code> for example). I agree with @gauden that there is no shortcut in using R through <code>Rpy</code>.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload