在rmarkdown的shinyapp的iframe

时间:2017-11-05 14:06:33

标签: r iframe r-markdown shiny

我想在一个rmarkdown文件中嵌入一个shinyapp,如果可能的话全屏。检查其他答案,我尝试了这个适用于此youtube:

---
title: "Derek Corcoran"
---

Some text

<iframe width="560" height="315" src="http://www.youtube.com/embed/9bZkp7q19f0?rel=0" frameborder="0" allowfullscreen></iframe>

Some more text

但是当我尝试使用我的闪亮应用程序时,它不起作用:

---
title: "Derek Corcoran"
---

Some text

<iframe width="560" height="315" src="https://derek-corcoran.shinyapps.io/WhereShouldYouLive/" frameborder="0" allowfullscreen></iframe>

Some more text

我尝试过的其他一些选项:

---
title: "Derek Corcoran"
---

Some text

<iframe width="560" height="315" src="https://derek-corcoran.shinyapps.io/WhereShouldYouLive/"></iframe>

Some more text

我只是得到一个空方

---
title: "Derek Corcoran"
---

Some text

<iframe src="https://derek-corcoran.shinyapps.io/WhereShouldYouLive/"></iframe>

Some more text

较小的空方。

任何想法

1 个答案:

答案 0 :(得分:2)

修正了它
```{r}
knitr::include_app("https://derek-corcoran.shinyapps.io/WhereShouldYouLive/")
```