Derek Corcoran
Derek Corcoran

Reputation: 4082

iframe of a shinyapp in rmarkdown

I am trying to embed a shinyapp in an rmarkdown file, if possible in full screen. Checking other answers, I tried this that works for this 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

but when I try with my shiny app it does not work:

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

Some text

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

Some more text

Some other options I tried:

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

Some text

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

Some more text

I just get an empty square

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

Some text

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

Some more text

Smaller empty square.

Any ideas

Upvotes: 0

Views: 1478

Answers (1)

Derek Corcoran
Derek Corcoran

Reputation: 4082

Fixed it with

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

Upvotes: 4

Related Questions