0
votes

I'm creating documentation using rmarkdown and Word as output. I'm not able to display correctly tables created using knitr/kable. They are displayed as plain text not table.

RMarkdown code:

---
title: "Untitled"
author: "Supek"
date: "9/9/2019"
output: word_document
always_allow_html: yes
---

```{r}
library(tidyverse)
library(knitr)
library(kableExtra)
data(mtcars)

dt <- mtcars[1:5, 1:6]

kable(dt) %>%
  kable_styling(bootstrap_options = c("striped", "condensed"))

1
You can output a basic table to Word with kable(dt, format="markdown"), but see @novica's answer for other options for more flexable table output in Word.eipi10

1 Answers

1
votes

This and this seem to suggest using another R package for getting tables in MSWord.