[R] printing out the summary for lm into a txt file

2009-02-17 Thread kayj
Hi All, I am trying to run several linear regressions and print out the summay and the anova reslts on the top of each other for each model. Below is a sample progarm that did not work. is it possible to print the anova below the summary of lm in one file? thanks for your help

Re: [R] printing out the summary for lm into a txt file

2009-02-17 Thread David Winsemius
did not work. Might that mean errors? Care to share? Running that through my wetware R interpreter, I think I am seeing you ask for creation of models with variable outcomes from a the first 100 columns of data. And then you are specifying a formula that includes a weird mixture of 3

Re: [R] printing out the summary for lm into a txt file

2009-02-17 Thread Greg Snow
The sink() command stops the sinking, so you send the lm output to the file, then stop the sinking before printing out the anova result. So the simplest thing to try is to put the first sink (with the filename and append=T) before you start the loop, remove all calls to sink within the loop,

Re: [R] printing out the summary for lm into a txt file

2009-02-17 Thread kayj
Thanks a lot for your help, it worked. Greg Snow-2 wrote: The sink() command stops the sinking, so you send the lm output to the file, then stop the sinking before printing out the anova result. So the simplest thing to try is to put the first sink (with the filename and append=T)

Re: [R] printing out the summary for lm into a txt file

2009-02-17 Thread kayj
this is the error message that I was getting In sink() ... : no sink to remove i got it to work . thanks for the help David Winsemius wrote: did not work. Might that mean errors? Care to share? Running that through my wetware R interpreter, I think I am seeing you ask for