[R] printing tabular data nicely
dmurdoch at pair.com
Thu Jun 3 21:06:14 CEST 2004
On Thu, 03 Jun 2004 10:19:26 -0700, wwsprague at ucdavis.edu wrote :
>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.
More information about the R-help