当我尝试用以下内容编写 RMarkdown 文档时ggvis
绘图到 Word,我从 Rstudio 收到以下消息。
Error: Functions that produce HTML output found in document targeting docx output.
Please change the output type of this document to HTML.
Execution halted
是否存在一个优雅的解决方案(无需太多努力)来实现这一点,也许使用export_png
and vg2png
?
这是一个例子:
```{r setup, include=FALSE}
library(dplyr)
library(ggvis)
```
The following table looks fine...
As long as I don't include this plot below
```{r, echo=FALSE, include=FALSE}
p <- pressure %>%
ggvis(x = ~temperature, y = ~pressure) %>%
layer_bars()
export_png(p, file = "hoge.png")
```
![](hoge.png)
如果你经常使用这个,你可以定义hook。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)