5
下面是可重複使用的示例。只要我包含一個ggvis
的數字,我就失去了格式化。在RMarkdown文檔中添加ggvis圖使得knitr :: kable輸出渲染不正確
---
title: "test"
output: html_document
---
```{r setup, include=FALSE}
library(dplyr)
library(ggvis)
library(knitr)
```
The following table looks fine...
```{r echo=FALSE, results='asis'}
cars %>% kable(format = 'markdown')
```
As long as I don't include this plot below
```{r, echo=FALSE}
pressure %>%
ggvis(x = ~temperature, y = ~pressure) %>%
layer_bars()
```
對於它的價值,我可以通過將'kable'調用改爲'kable(format =「html」,table.attr ='class = \「table table = striped table-hover \「')' – kevinykuo