[R] xtable - print - suppress output

Rolf Turner r.turner at auckland.ac.nz
Tue Sep 22 00:21:30 CEST 2009


On 22/09/2009, at 10:13 AM, Martin Batholdy wrote:

>
> Am 21.09.2009 um 23:59 schrieb Rolf Turner:
>
>>
>> On 22/09/2009, at 9:52 AM, Martin Batholdy wrote:
>>
>>> hi,
>>>
>>>
>>>
>>> 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)

Why would you want html code stored in an R object???

I believe, although there is no telling, that what you want
to do is something like:

	mung <- xtable(CERAT)
	print(mung,file="gorp",type="html")

This will create a *file* of html code that a web browser can use.

	cheers,

		Rolf Turner

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}




More information about the R-help mailing list