Re: [R] xtable - print - suppress output

2009-09-24 Thread David Winsemius
On Sep 24, 2009, at 10:20 AM, Thomas Lumley wrote: On Mon, 21 Sep 2009, David Winsemius wrote: 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 wan

Re: [R] xtable - print - suppress output

2009-09-24 Thread Thomas Lumley
On Mon, 21 Sep 2009, David Winsemius wrote: 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 <- prin

Re: [R] xtable - print - suppress output

2009-09-21 Thread Gabor Grothendieck
Note that R has a capture.output function, e.g. s <- capture.output(print(xtable(BOD), type = "html")) On Mon, Sep 21, 2009 at 9:21 PM, Charlie Sharpsteen wrote: > On Mon, Sep 21, 2009 at 3:52 PM, Don MacQueen wrote: > > snip... > > >> In other words, there is no such thing as saving the html

Re: [R] xtable - print - suppress output

2009-09-21 Thread Charlie Sharpsteen
On Mon, Sep 21, 2009 at 3:52 PM, Don MacQueen wrote: snip... > In other words, there is no such thing as saving the html table into a > variable. It just doesn't work that way. All that is possible is to write it > (print it) to either the screen or a file. > > Which leads back to the question

Re: [R] xtable - print - suppress output

2009-09-21 Thread Don MacQueen
I think there is a conceptual issue here. The xtable() function does not actually create html. What it does is add some attributes to the dataframe that is given to it. Here's an example: tmp <- data.frame( a =1:3, b= c('a','b','c') ) foo <- xtable(tmp) class(foo) [1] "xtable" "da

Re: [R] xtable - print - suppress output

2009-09-21 Thread David Winsemius
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 w

Re: [R] xtable - print - suppress output

2009-09-21 Thread Rolf Turner
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

Re: [R] xtable - print - suppress output

2009-09-21 Thread Martin Batholdy
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; tabl

Re: [R] xtable - print - suppress output

2009-09-21 Thread David Winsemius
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 supp

Re: [R] xtable - print - suppress output

2009-09-21 Thread 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

[R] xtable - print - suppress output

2009-09-21 Thread Martin Batholdy
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? thanks!