Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><code>importr</code> is a pretty high level function, trading performance for ease-of-use. It does a lot beside just loading an R package. It also maps all R objects in that package to Python (rpy2) objects. That effort is lost when doing <code>importr('lattice')</code> in your script, if the result is not used.</p> <p>Beside that, importing packages in R itself is not without a cost (for the larger R packages with S4 class definitions, you this can be noticeable when the script is short). <code>rpy2</code> can't do much about this.</p> <p>Using R variables such as R_PROFILE is possible, but this was not enabled by default before <a href="https://bitbucket.org/lgautier/rpy2/commits/488383323ecaf30ed307ac7e642122e51677c756" rel="nofollow noreferrer">very recently</a>. How to enable it is on SO (<a href="https://stackoverflow.com/questions/6364082/rpy2-importr-fails-with-renviron">here</a>).</p> <p>Now, here <code>importr</code> is taking "only" 25% of the response time. Optimization efforts focusing on this will not be able to make it more than 25% faster (and that's a very optimistic limit). Interpolating data into a string to evaluate it as R code after that is not very optimal (as warned in the <a href="http://rpy.sourceforge.net/rpy2/doc-2.3/html/robjects_rinstance.html?highlight=evaluate#evaluating-a-string-as-r-code" rel="nofollow noreferrer">documentation for rpy2</a> ). Consider calling the R function through rpy2, passing the data as anything exporting the buffer interface (for example).</p>
    singulars
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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