Bug 14250 - output from print.lm and from print.glm
output from print.lm and from print.glm
Status: RESOLVED FIXED
Product: R
Classification: Unclassified
Component: I/O
R 2.10.1 patched
All All
: P4 minor
Assigned To: Martin Maechler
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-07 15:57 UTC by Sanford Weisberg
Modified: 2010-04-07 21:22 UTC (History)
1 user (show)

See Also:


Attachments
R commands to illustrate the problem and provide a solution (1.81 KB, text/plain)
2010-04-07 15:57 UTC, Sanford Weisberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sanford Weisberg 2010-04-07 15:57:20 UTC
Created attachment 1094 [details]
R commands to illustrate the problem and provide a solution

If the call element of an lm or glm object is long, the output from print.lm and print.glm fails to insert a line feed in the correct place.  However, both print.summary.lm and print.summary.glm correctly insert a line feed.

The first few lines of the attachment illustrate the problem, using a data set from the 'car' package.  Corrected versions of the functions are also included in the attachment.
Comment 1 Martin Maechler 2010-04-07 21:22:30 UTC
I have fulfilled this wish or fixed this buglet  for R-devel (to be 2.12.0 in fall 2010) only (rev 51634).

Now that this is used in 4 different print methods [ print(.summary)?.g?lm ]
and as it is simple but still not "perfect",
one could think of writing a small  formatCall() utility {e.g. in 'utils'}, which would be even nicer and would be called from all these {and then many other programmeRs print() / show() methods.

Martin