I am writting some functions that return an array of coefficients
along with confidence intetervals for each coefficient. My intent is
to eventually typeset the coefficients and intervals into a table (or
tables) in a document. I would like to use existing tools such as the
'latex' function in the Hmisc package, the 'odfTable' function
in
odfWeave package, or 'HTML' in the R2HTML package (or any others that
work similarly).
This is fairly straight forward for 2 dimensional arrays (matrices)
without the confidence intervals, just add the proper dimnames and
call latex or whatever. In some cases the array is 3 dimensional and
could possibly have 4 dimensions, which complicates things a bit. If
nothing better presents itself I can use apply to produce several 2
dimensional tables from the higher dimentsional array.
The big complication is that I would like each cell of the final table
to have the coefficient value with the confidence limits below it,
e.g.:
5.3
(4.2,6.4)
My current thinking is to have a function (possibly a summary method)
that takes the output from my functions and returns something that
could be passed directly to the latex, odfTable, etc. functions:
> myobj <- myfunc(myargs)
> latex( summary(myobj), file='mytempfile' )
I prefer to use LaTeX, but many of the people I work with are stuck
with MS products so the odf or html options are attractive there.
Does anyone have any suggestions on how best to format the output so
it can be passed to latex and friends? or will I need to write my own
methods for these functions? (I know enough LaTeX to probably do a
method for latex, but don't have enough knowledge of html or odf to do
the others myself)
Thanks for any suggestions,
[[alternative HTML version deleted]]