Using knitr and R Markdown, I can produce a tabularised output from a matrix using the following command:
```{r results=\'asis\'} kable(head(x)) ``` <
```{r results=\'asis\'} kable(head(x)) ```
Nowadays one can set df_print in the YAML header:
df_print
--- output: html_document: df_print: kable --- ```{r} head(iris) ```