> When you simply type summary.lm there is an implicit call to
> print.summary.lm but its code is not visible unless you use
> getAnywhere(print.summary.lm ).

Aha, that's great -- now I see all the "\n" (and can get rid off
them ;-)).

> Reading the code you find that the
> coefficient matrix and the significance stars are handled by a
> function , so this should give you what you want:
> 
> printCoefmat(summary(model)$coefficients)
> 

For the record, now I'm using

short_summary_lm = function(L) {
  S = summary(L)
  printCoefmat(S$coefficients, signif.legend=FALSE)
  digits = max(3,getOption("digits")-3)
  cat("R-squared:", formatC(S$r.squared, digits = digits), "\n")
}

Thanks!

Oliver

______________________________________________
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.

Reply via email to