rinterface.set_writeconsole() doesn't work

Issue #15 wontfix
irha created an issue

I installed rpy2-2.1.0a04072009.win32-py2.6.msi and tried the below:


from rpy2.robjects import r from rpy2 import rinterface r('print("hi from R")') [1] "hi from R" <StrVector - Python:0x013A1580 / R:0x01B1A868> def r_print(msg): ... print "R: %s" % msg ... rinterface.set_writeconsole(r_print) r('print("hi from R")') [1] "hi from R" <StrVector - Python:0x013AA6C0 / R:0x01B15C40>


As you can see, the r_print() python function didn't get called.

Comments (5)

  1. Former user Account Deleted

    My apologies, haven't noticed that warning. As a workaround, I am going to just use the R's sink() function to redirect to a vector and then read the vector at the end of execution.

  2. Log in to comment