[R] printing tabular data nicely

Marcus Davy MDavy at hortresearch.co.nz
Fri Jun 4 01:23:00 CEST 2004


Hi,
If you choose to use LaTeX and xtable, you can also enhance the visual
presentation
of the output tables using the booktab LaTeX package. Have a look at:

http://www.ecs.soton.ac.uk/~srg/softwaretools/document/start/booktabs.pdf

You can change the horizontal line tags \hline to \toprule, \midrule,
and \bottomrule, at your discretion. 
There was also a recent thread about rownames quirks with xtable:

http://tolstoy.newcastle.edu.au/R/help/04/05/0678.html


marcus



>>> Duncan Murdoch <dmurdoch at pair.com> 4/06/2004 7:06:14 AM >>>
On Thu, 03 Jun 2004 10:19:26 -0700, wwsprague at ucdavis.edu wrote :

>Hi R-heplers,
>
>I would like to print various matrices, dataframes, tables, etc to 
>files, preferably nicely formatted postscript for import into papers.

>Is there a way to do this?
>
>I know ?cat, ?writeLines, ?format, ?paste.  But I am not sure of a
good 
>combination of these in order to get a nice looking table of
information.
>
>Any ideas?  I guess I want (almost) publication ready output, just
like 
>you get for "plot"...
>
>(I *don't* want to print to the console, btw)

As Sundar said, xtable is probably what you want.  You may also
benefit from the fairly new "addmargins" function.

Duncan Murdoch

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help 
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html

______________________________________________________

The contents of this e-mail are privileged and/or confidenti...{{dropped}}




More information about the R-help mailing list