Re: [Rpy] Accessing lm() elements

2008-12-12 Thread Laurent Gautier
Gary Strangman wrote: > Hi again, > > Forgive me if this is a completely silly question for rpy2. I'm trying to > wean myself from rpy, but am confused by the new approach to conversion. > If I fit a model and collect summary info as follows ... > > fit = robjects.r.lm(fmla,data) > summary = ro

Re: [Rpy] Accessing lm() elements

2008-12-12 Thread Laurent Gautier
laurent oget wrote: > I do std-error=r['$'](summary,'sigma') Smart use of "$". Other possible way: summary.r["sigma"][0][0] > I think r.names(summary) will give you the components. It gives the names of the components. Consider the following example: import rpy2.robjects as ro fit = ro.

Re: [Rpy] Accessing lm() elements

2008-12-12 Thread Gary Strangman
Thanks! (I probably never would have come up with those.) FWIW, I also just stumbled across the option of doing numpy.array(summary[3]) which gives me a 3x4 array that I can index normally. So, I appear to be fully up-and-running now. Thanks! Gary P.S. The impetus for the switch was a kind of

Re: [Rpy] Accessing lm() elements

2008-12-12 Thread laurent oget
I do std-error=r['$'](summary,'sigma') I think r.names(summary) will give you the components. Laurent 2008/12/12 Gary Strangman : > > Hi again, > > Forgive me if this is a completely silly question for rpy2. I'm trying to > wean myself from rpy, but am confused by the new approach to conversion.

[Rpy] Accessing lm() elements

2008-12-12 Thread Gary Strangman
Hi again, Forgive me if this is a completely silly question for rpy2. I'm trying to wean myself from rpy, but am confused by the new approach to conversion. If I fit a model and collect summary info as follows ... fit = robjects.r.lm(fmla,data) summary = robjects.r.summary(fit) ... the summar

Re: [Rpy] Linux import failure

2008-12-12 Thread Gary Strangman
Well, that's about the easiest fix I've ever seen. Works like a charm. Thanks! Gary On Fri, 12 Dec 2008, laurent oget wrote: > This is a known issue when R_HOME is set. > > One easy work-around is to unset R_HOME and set your path so R is in the path. > > This is fixed in svn and will be fixed

Re: [Rpy] Linux import failure

2008-12-12 Thread laurent oget
This is a known issue when R_HOME is set. One easy work-around is to unset R_HOME and set your path so R is in the path. This is fixed in svn and will be fixed in the next release. Laurent 2008/12/12 Gary Strangman : > > Hi RPy gurus, > > I'm trying to upgrade to rpy2 and ran into the following

[Rpy] Linux import failure

2008-12-12 Thread Gary Strangman
Hi RPy gurus, I'm trying to upgrade to rpy2 and ran into the following trouble (CentOS5, R2.8.0). I got rpy2 to build without difficulty, and set RHOME appropriately (note, if it matters I have R and rpy installed in a non-standard site, as I don't have admin rights to put it in /usr/local).