Using knitr and R Markdown, I can produce a tabularised output from a matrix using the following command:
```{r results=\'asis\'}
kable(head(x))
```
<
Not exactly what you are looking for, but I am posting an answer here (that could not fit in a comment) as your described workflow is really similar to what my initial goal and use-case was when I started to work on my pander
package. Although I really like the bunch of chunk options that are available in knitr
, I wanted to have an engine that makes creating documents really easy, automatic and without any needed tweaks. I am aware of the fact that knitr
hooks are really powerful, but I just wanted to set a few things in my Rprofile
and let the literate programming tool its job without further trouble, that ended to be Pandoc.brew for me.
The main idea is to specify a few options (what markdown flavour are you using, what's your decimal mark, favorite colors for your charts etc), then simply write your report in a brew syntax without any chunk options, and the results of your code would be automatically transformed to markdown. Then convert that to pdf/docx/odt etc. with Pandoc.