Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 .Rmd 文件,我想将它导出为 HTML 文件。但是表格看起来不对。在 Rstudio 中,表格看起来不错:
但是当我将其导出为 HTML(或 PDF、Word,单击“Knit”)时,表格无法正确显示:
也许你正在寻找kable可以输出 md 表的 ,并将results选项设置为asis.
kable
results
asis
```{r, results='asis'} efficient <- mtcars[mtcars$mpg > 23,] knitr::kable(efficient) ```