[R] How to output glm summary to csv file

Jim Lemon jim at bitwrit.com.au
Tue Jun 17 13:40:34 CEST 2008


Chua Siang Li wrote:
>    Hello there.  I am new to R.
>    I want to output the coefficients and their significance value (Pr(>|z|)
>    into a csv file.  I managed to do it for the "coefficients" but not their
>    significances.  Pls help.  Thanks.
>    mylogit<-      glm(response~price,      family=binomial(link="logit"),
>    na.action=na.pass)
>    summary(mylogit)
>    write.csv(c(mylogit$coefficients), file="result.csv")
>    write.csv(I(summary(mylogit)), file="result.csv", append=T)  #neither does
>    this shows Pr(>|z|)

Hi Chua,
delim.table in the prettyR package might do what you want.

Jim



More information about the R-help mailing list