[R] xtable - print - suppress output
David Winsemius
dwinsemius at comcast.net
Tue Sep 22 00:22:46 CEST 2009
On Sep 21, 2009, at 6:13 PM, Martin Batholdy wrote:
>
> Am 21.09.2009 um 23:59 schrieb Rolf Turner:
>
>>
>> On 22/09/2009, at 9:52 AM, 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?
>>
>> If you don't want it printed, then why the <expletive deleted>
>> are you (explicitly!) using print??? Words fail me!!!
>>
>> cheers,
>>
>> Rolf Turner
>
>
> Because I don't get html code when I only use xtable(xy)
One further alternative that is quieter is the html function in Hmisc,
however this produces a browser page display rather than an R console
output. It does not output h to the console upon creation
data(tli)
h <- html(tli)
h # the print.html method is part of Hmisc
--
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
More information about the R-help
mailing list