[Rpy] Result rpy2.rinterface.SexpVector
I was able to call lmer using this: robjects.r.assign('y',y) robjects.r.assign('x',x) robjects.r.assign('county',county) res = robjects.r('lmer (y ~ 1 + (1 | county))') Printing res displays a nice summary. But I need all the information in the result object, res.rclass displays rpy2.rinterface.SexpVector. I tried to access this object in various ways, I wasnt able to make it work. What is the recommended way to do this? -- Virtualization is moving to the mainstream and overtaking non-virtualized environment for deploying applications. Does it make network security easier or more difficult to achieve? Read this whitepaper to separate the two and get a better understanding. http://p.sf.net/sfu/hp-phase2-d2d ___ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list
Re: [Rpy] Result rpy2.rinterface.SexpVector
Also I do print res.r_repr(), I get -- Virtualization is moving to the mainstream and overtaking non-virtualized environment for deploying applications. Does it make network security easier or more difficult to achieve? Read this whitepaper to separate the two and get a better understanding. http://p.sf.net/sfu/hp-phase2-d2d ___ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list
Re: [Rpy] Result rpy2.rinterface.SexpVector
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 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
Re: [Rpy] Result rpy2.rinterface.SexpVector
> > Use the method .rx2() > http://rpy.sourceforge.net/rpy2/doc-2.2/html/vector.html?highlight=rx2#extracting-r-style > Hi, I used rx2(), passing the name of a column, or index, I seem to get back a vector of size 1. My test code along with data is here http://dl.dropbox.com/u/1570604/radon.zip How can I get back a full vector of items seen below? r_repr() shows me: structure(list(county = structure(list("(Intercept)" = c(1.06750311717691, 0.887536167587372, 1.23038235347237, 1.22454371552118, 1.28997542657877, .. )), .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") Thanks, -- 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