RMarkdown-单词输出-很热,可以正确显示表格

时间:2019-09-09 07:54:17

标签: r r-markdown knitr kable

我正在使用rmarkdown和Word作为输出来创建文档。 我无法正确显示使用knitr / kable创建的表。 它们显示为纯文本而不是表格。

RMarkdown代码:

---
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 个答案:

答案 0 :(得分:1)

Thisthis似乎建议使用另一个R包在MSWord中获取表。