[R] How do I output all the R-squares of an SUR? summary(fitSUR$eq[[1:4]])$r.squared does not work

StellathePug ritacarreira at hotmail.com
Tue Jun 28 19:09:11 CEST 2011


> sapply(fitSUR$eq, function(x) summary(x)$r.squared)
> You can abbreviate that to:
> sapply(summary(fitSUR)$eq, "[[", "r.squared")

This is fantastic! Thanks so much. 

I had a hunch that it would be something related to the apply family but I
am still not very good at using it. Thank you immensely for the two
examples, they made my day!!!

Rita

--
View this message in context: http://r.789695.n4.nabble.com/How-do-I-output-all-the-R-squares-of-an-SUR-summary-fitSUR-eq-1-4-r-squared-does-not-work-tp3630601p3630900.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list