[R] Nicely formatted tables

steve fisk at bowdoin.edu
Fri Dec 15 01:14:40 CET 2006


> apply(iris[, 1:4], 2, summary)

Nice solution!
However,  latex(apply(iris[, 1:4], 2, summary))
has the odd effect that the upper left corner  is "apply".
This is the "title", so to produce a file "abc.tex" and have an empty 
upper left corner you need

latex(apply(iris[, 1:4], 2, summary),title="",file="abc.tex")

And, since I wanted a more compact table, the following works just as 
expected:

latex(format(apply(iris[, 1:4], 2, 
summary),digits=2),title="",file="abc.tex")

thank you!

Steve



More information about the R-help mailing list