Skip to content
Prev 172291 / 398502 Next

Cross Tables with odfTable in odfweave

PJ,
You will have to do some work to get CrossTable results into odfWeave
for a few reasons. The main one is: CrossTable prints the output (as
opposed to outputting an object of a certain class that uses print to
make the results like table() and print.table()). In some cases, it is
easy to translate the output you see on the screen to odf markup. I'm
not sure that this function is one of those cases. That is not a
slight against the function, it just isn't meant to do that.
It would be nice to have a reproducible example along with the results
of sessionInfo(). Looking at ?odfTable, it has that the main argument
should be "a vector, matrix or data frame". I can' tell if there is a
bug in odfTable or if you are just using it incorrectly.
CrossTable may not be what you want then. The results are a list of
components of the table.