Re: [Rpy] call for feedback: enhanced rpy2 api: 'rnumpy'

2009-03-23 Thread Laurent Gautier
Nathaniel Smith wrote: > On Mon, Mar 23, 2009 at 5:43 AM, Laurent Gautier wrote: >> The magic "R" for ipython (among others) is a very nice idea. Having a way >> to switch between Python and R in interactive mode was one of the cool >> things I wished to have. > > I find it ridiculously handy in

Re: [Rpy] R console: long output

2009-03-23 Thread Laurent Gautier
Nathaniel Smith wrote: > On Mon, Mar 23, 2009 at 5:31 PM, Brandon Invergo > 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,

Re: [Rpy] R console: long output

2009-03-23 Thread Nathaniel Smith
On Mon, Mar 23, 2009 at 5:31 PM, Brandon Invergo 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

[Rpy] R console: long output

2009-03-23 Thread Brandon Invergo
Hello, I'm enjoying the fun (self-imposed) task of learning Python, RPy2 and PyGTK all in one go, so this question may be partly due to my general status as a newbie. My application will have an embedded console in it. Everything is generally working nicely, however I've noticed that if I load a p

Re: [Rpy] call for feedback: enhanced rpy2 api: 'rnumpy'

2009-03-23 Thread Nathaniel Smith
On Mon, Mar 23, 2009 at 5:43 AM, Laurent Gautier wrote: > The magic "R" for ipython (among others) is a very nice idea. Having a way > to switch between Python and R in interactive mode was one of the cool > things I wished to have. I find it ridiculously handy in practice. (It also made my advis

[Rpy] proposal: new interface to R_tryEval

2009-03-23 Thread Nathaniel Smith
I'd like to propose that we add a new low-level API to R_tryEval to rpy2.rinterface. This would be lower-level than the existing .__call__, .rcall methods, and have the following parts: * rpy2.rinterface.tryEval (or whatever): a function that takes an expression rinterface.Sexp, and an environment

Re: [Rpy] call for feedback: enhanced rpy2 api: 'rnumpy'

2009-03-23 Thread Nathaniel Smith
On Mon, Mar 23, 2009 at 4:59 AM, Gary Strangman wrote: > > The rnumpy concept looks great, and addresses some annoyances I've > encountered working at the interface between R and numpy. Great! > I hope to test > rnumpy this week, but in the meantime ... the text suggests that R data > frames can

Re: [Rpy] Help with data frames in rpy2

2009-03-23 Thread Laurent Gautier
Lindsey, The documentation is indeed missing an explicit example. Try: import rpy2.robjects as ro import rpy2.rlike.container as rlc tl = rlc.TaggedList((ro.IntVector((1,)), ro.IntVector((2,))), tags = ('a', 'b')) df = ro.RDataFrame(tl) A TaggedList

[Rpy] Help with data frames in rpy2

2009-03-23 Thread Lindsey Bangay
Please could I ask someone for a simple example on how to use tagged lists or to create a R dataframe. I specifically need this in order to preserve the order in which variables are added to a data frame. I have fiddled with little success. Any example would be appreciated. Thanks Lindsey --

Re: [Rpy] call for feedback: enhanced rpy2 api: 'rnumpy'

2009-03-23 Thread Laurent Gautier
Nathaniel Smith wrote: > I finally had a chance to write up some quick documentation, so I > pushed out a copy of my enhanced Python->R API for feedback. Great ! > This is an alternative to the rpy2.robjects API (it still depends on > rpy2.rinterface version 2.0.3, plus it needs numpy to be insta

Re: [Rpy] call for feedback: enhanced rpy2 api: 'rnumpy'

2009-03-23 Thread Gary Strangman
The rnumpy concept looks great, and addresses some annoyances I've encountered working at the interface between R and numpy. I hope to test rnumpy this week, but in the meantime ... the text suggests that R data frames can be manipulated/sliced using rnumpy. Can they be created directly as wel

[Rpy] call for feedback: enhanced rpy2 api: 'rnumpy'

2009-03-23 Thread Nathaniel Smith
I finally had a chance to write up some quick documentation, so I pushed out a copy of my enhanced Python->R API for feedback. This is an alternative to the rpy2.robjects API (it still depends on rpy2.rinterface version 2.0.3, plus it needs numpy to be installed), and is subject to change. But I'v