【问题标题】:iframe of a shinyapp in rmarkdownrmarkdown 中闪亮应用的 iframe
【发布时间】:2018-04-17 18:16:19
【问题描述】:

我正在尝试在 rmarkdown 文件中嵌入一个闪亮的应用程序,如果可能的话全屏显示。检查其他答案,我尝试了这个适用于这个 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

较小的空方格。

任何想法

【问题讨论】:

  • 我不确定 - 我首先怀疑是父级或子级中的 CSP 标头 - 也许在加载时打开网络检查器可能会带来一些清晰...

标签: r iframe r-markdown shiny


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2016-02-03
    • 2015-08-07
    • 1970-01-01
    • 2017-06-29
    • 2016-03-26
    • 2021-09-30
    • 2016-01-06
    • 2016-04-21
    相关资源
    最近更新 更多