I realized I can have R seperate out the result. So I have

robjects.r('M0 = lmer (y ~ 1 + (1 | county))')    
res = robjects.r('coef(M0)')

coef function returns the detailed result. From this

print res.rclass
print res.r_repr()

I get 

<rpy2.rinterface.SexpVector - Python:0xb78ccee0 / R:0xc45a040>
structure(list(county = structure(list("(Intercept)" = c(1.06750311717691, 
0.887536167587372, 1.23038235347237, 1.22454371552118, 1.28997542657877, 
...
...
1.43258359311308, 1.40791697459764, 1.49612123813243, 1.28341119552016
)), .Names = "(Intercept)", row.names = c("AITKIN", "ANOKA", 
"BECKER", "BELTRAMI", "BENTON", "BIG STONE", "BLUE EARTH", "BROWN", 
...
"WINONA", "WRIGHT", "YELLOW MEDICINE"), class = "data.frame")), .Names =
"county", class = "coef.mer")

How can I access this? It is reported to be as SexpVector, but res[0] gives me
the same thing as str(res). 


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to