# load example linear model from ?lm ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) group <- gl(2,10,20, labels=c("Ctl","Trt")) weight <- c(ctl, trt) lm.D90 <- lm(weight ~ group - 1) # omitting intercept
# store the summary() output into a new variable x <- summary(lm.D90) # access the coefficients attribute directly x$coefficients # or just look at the first six head( x$coefficients ) # choose a place to store the file on your local disk tf <- "c:/my directory/myfile.csv" # write the coefficients to a csv write.csv( x$coefficients , tf ) On Fri, Nov 23, 2012 at 5:42 PM, cavan <cavan.constanta...@gmail.com> wrote: > General question concerning summary results of a linear model. I've tried > to > look in help and search online but I either don't understand it or I can't > find the answer. > > I've defined a model with a really large number of variables and levels. > The > summary results are so big that not all of the coefficients etc can be > displayed completely in the console. I try to scroll back and I've tried to > 'page up' but I can't seem to get to a previous page where I presume the > 'upper' missing portion of my results would be. In the meantime, I've > reduced my model size but I would really appreciate it if I could see the > model results for the model I really wanted to investigate. > > Please could someone tell me how to 'retrieve' my results. > > Also, is there a way to export these results into Excel? > > > > -- > View this message in context: > http://r.789695.n4.nabble.com/Results-displayed-in-Console-tp4650607.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@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. > [[alternative HTML version deleted]] ______________________________________________ R-help@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.