[R] xtable - print - suppress output
David Winsemius
dwinsemius at comcast.net
Tue Sep 22 00:09:42 CEST 2009
On Sep 21, 2009, at 5:52 PM, Martin Batholdy wrote:
>
> I use xtable to convert data.frames to html tables.
> But when I use the print-command I always get the whole output printed
> even if I just want to save the html table into a variable;
>
> table <- print(xtable(CERAT), type="html")
>
>
> How can I suppress that output is printed?
Perhaps by diverting it somewhere else? (after the example in xtable's
help page)
capture.output(print(tli.table, type="html"), file="HTout.html")
R is not an HTML editor, so it would seem less than intuitive to send
it to a character variable. It would not work to assign the value of
capture.output since that is an invisible NULL.
--
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
More information about the R-help
mailing list