On Mon, Mar 23, 2009 at 5:31 PM, Brandon Invergo
<bran...@brandoninvergo.com> wrote:
> The data is loaded as expected, but when I try to
> print the output to the console, only a portion of the data.frame is
> printed (~65000 characters), presumably because it reached the maximum
> string size, and then a seemingly-unrelated GTK widget breaks (but we'll
> ignore that part for now)

Hard to tell what exactly's going on from here, but Python itself is
quite happy to create and manipulate strings much larger than 65k --
its maximum is somewhere in the gigabytes range, if that. (That's a
suspicious number, though -- perhaps some of your widgetry somewhere
has a 2**16 limit?)

> What seems ideal to me would be a way to grab the R console output one
> line at a time rather than all at once so I can just append those lines
> individually to my gtk text buffer. I can easily do this for a specific
> task, such as only for a data.frame, programmatically break it apart by
> rows. However, I'm hoping for something more general that could apply to
> any output.
>
> I have tried to set robjects.rinterface.setWriteConsole(f) to some
> function f that just appends to a buffer, but that console callback
> function doesn't seem to append anything to the buffer if I do a call to
> robjects.r("some command here").

robjects.r("foo") doesn't print anything itself. (Unless 'foo' calls
the print() function.) Try robjects.r("print(foo)") or
robjects.r["print"](robjects.r("foo")).

-- Nathaniel

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to