[R] LaTeX Output (was: HTML Output from R)
ksueber at gwdg.de
Thu Sep 30 22:24:49 CEST 1999
Kurt Hornik schrieb:
> >>>>> Terry J Westley writes:
> > I recommend that you model your HTML write function after
> > write.table(). It's got many of the features you'd like
> > to have and also will give you some good hints on how
> > to handle row and column names and avoid that "forbidden"
> > for loop.
> Yes, this is a very good suggestion. Eventually, one could have
> something like write.table(..., format = "HTML") (or LaTeX).
I wrote a library(tex), it may be not as clean as a write.table(...,
format="LaTeX"), but it is quite powerful, I think.
It takes the colnames as default, extra (and rotated) headers are possible
(also grouping the header over some cols), grouping the body automatically
by inserting clines if a value in selected cols changes, using longtable,
booktabs, rotating, adjusting cols at the decimal comma (german, but to use
comma or point to split is a thing on the TeX-side)... the result is written
to stdout or to a file.
possible options are:
textable <- function(data,
header=NA, headerunits=NA, # a list would be better
file=NULL, na.mask=T, sideways=F,
The code is weird, it's one the way to be rewritten. So it could be a good
time to do it clean as write.table... I'll try to start next week.
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
More information about the R-help