[R] personalize regression printing?
ivo welch
ivowel at gmail.com
Thu Mar 22 21:10:37 CET 2007
dear R experts:
I am often struggling with a desire of wanting to change the basic
output that R prints.
For example, a year ago, I wanted to add the mean to the summary()
statement, and eventually got help from friendly souls who showed me
how to copy the summary() routine and then modify it.
now I would like to abbrev some of the output from summary(lm()). For
example, I want to eliminate the "Residuals" output. I also am not
quite sure why "Call:" is followed by a new line rather than just with
a continuation of the model itself. I also wonder why the word
"Coefficients" seems to consume a line without being particularly
helpful. I wonder if "Coef" could appear before "Estimate Std. Error"
on the same line. All these are changes that would allow me to see
more information on the same page.
I do know that I can copy the functions themselves, if I can find
them, and replace them myself. However, this means that future
versions of R may make changes that I may miss completely. Its a
solution, yes.
However, my first question is---for summary(lm()), would it make sense
to have more options that control the output? At least to suppress
the printing of the distribution of the residuals?
A long-term solution, which is easy to suggest for me given that I do
not have to do any work to implement it, would be to allow some
templates that specify how output should be formatted. R would first
load the system templates, and thereafter any templates that the user
specifies (has overridden). The R functions would then work according
to the current template. Talking is easy; Walking is hard, of
course. Just a suggestion...
Regards,
/iaw
More information about the R-help
mailing list