[Rd] printing coefficients with text

Ross Boylan ross at biostat.ucsf.edu
Thu Nov 30 21:17:55 CET 2006

I want to print the coefficient estimates of a model in a way
as consistent with other output in R as possible. stats provides the
printCoefmat function for doing this, but there is one problem.  I
have an additional piece of textual information I want to put on the
line with the other info on each coefficient.

The documentation for printCoefmat says the first argument must be
numeric, which seems to rule this out.

I just realized I might be able to cheat by inserting the text into
the name of the variable (fortunately there is just one item of
text).  I think that's in the names of the matrix given as the first
argument to the function.

Are there any better solutions?  Obviously I could just copy the
method and modify it, but that creates duplicate code and loses the
ability to track future changes to printCoefmat.

Ross Boylan

More information about the R-devel mailing list