[R] Customized R Regression Output?
Bert Gunter
gunter.berton at gene.com
Sun May 27 20:31:09 CEST 2012
No. Your advice is incorrect. See below.
On Sun, May 27, 2012 at 7:42 AM, Özgür Asar <oasar at metu.edu.tr> wrote:
> Your welcome,
>
> To extract R squared values, you can use
>
> summary(lm1)$r.squared
>
> and include it in the cbind as
>
> result1<-cbind(summary(lm1)$coef[,1],summary(lm1)$coef[,1],summary(lm1)$r.squared)
use
?c
to concatenate. cbind is for matrix-like structures.
c(summary(lm1)$coef[,1],summary(lm1)$coef[,1],summary(lm1)$r.squared)
>
> To add the results of multiple outputs you can use rbind such as
>
> rbind(result1,result2)
No. This will most likely fail. rbind is for matrix-like structures. Use
?list
to combine possibly different structures into a single entity.
I suggest that both the OP and the responder spend some time with "An
Introduction to R" or other basic R tutorial of their choice where
matters like this are discussed before posting further to this list
Cheers,
Bert
>
> where result2 is the output of the second model.
>
> Best
> Ozgur
>
>
> -----
> ************************************
> Ozgur ASAR
>
> Research Assistant
> Middle East Technical University
> Department of Statistics
> 06531, Ankara Turkey
> Ph: 90-312-2105309
> http://www.stat.metu.edu.tr/people/assistants/ozgur/
> --
> View this message in context: http://r.789695.n4.nabble.com/Customized-R-Regression-Output-tp4631497p4631507.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
--
Bert Gunter
Genentech Nonclinical Biostatistics
Internal Contact Info:
Phone: 467-7374
Website:
http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm
More information about the R-help
mailing list