Skip to content
Prev 205531 / 398506 Next

problem with odfWeave

Hi Joel,

If you actually want to make a table, you need to use odfTable. There
are examples
in the help for that function. Same for odfCat, but instead of
creating a table, that will
print your output.

eg to print your output:

<<echo=FALSE>>=
    odfCat("some random normal data:", rnorm(5)) # from the help file
@

or to make a table:

<<echo=FALSE>>=
    x <- matrix(1:12, ncol=3)
    colnames(x) <- c("a", "b", "c")
    odfTable(x)
    odfTableCaption("A useless table")
@

ODT files are actually compressed XML files. If you just print from
within R, there are no
XML tags around your output and OpenOffice has no idea what to do with it. The
various odfSomething R functions wrap the R output in XML tags so OOo will
understand it in the final output.

Sarah
On Wed, Jan 6, 2010 at 12:41 PM, Joel GOMBIN <joel.gombin at gmail.com> wrote: