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.r["lm"]("%s ~ %s" %(ro.IntVector([1,2,3]).r_repr(),
                              ro.IntVector([3,1,2]).r_repr()))
sfit = ro.r["summary"](fit)

elt = [sfit[i] \
        for i,x in enumerate(ro.r["names"](sfit)) if x == "sigma"]

# and yet another way to get "sigma".
elt[0]






L.


------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to