嵌入图像会破坏RMarkdown演示文稿中的javascript

时间:2014-11-22 18:02:41

标签: r knitr r-markdown

以下结果很好。

---
title: "Untitled"
output: ioslides_presentation
---

## forceNetwork

```{r, echo = FALSE}
library(networkD3)
data(MisLinks)
data(MisNodes)
forceNetwork(Links = MisLinks, Nodes = MisNodes, Source = "source",
             Target = "target", Value = "value", NodeID = "name",
             Group = "group", opacity = 0.4)
```

## word cloud

```{r echo = FALSE, warning = FALSE}
library(wordcloud)
wordcloud(c(letters, LETTERS, 0:9), seq(1, 1000, len = 62))
```

但是,如果我切换幻灯片的顺序,即首先是文字云,则js可视化不会显示。

修改 我发现如果刷新页面,图形就会显示出来。为什么会这样?

0 个答案:

没有答案