Reputation: 392
I have a shiny app hosted on shinyapps.io. I embed this in a html RMarkdown document using:
```{r}
knitr::include_app("shiny app web address")
```
This works and I successfully see the embedded shiny app, but I cannot adjust the width. include_app() has an option to adjust height, but I cannot find an option to adjust the width of the imframe.
I have tried this:
```{r}
knitr::opts_chunk$set(fig.width=16, fig.height=8)
knitr::include_app("shiny app web address")
```
But the width and height of the app do not adjust.
Does anyone have any ideas on how to adjust the width of this embedded app?
Thanks for the help.
Edit: I have also tried this: {r fig.width=16, fig.height=8}
with no luck. Any ideas?
Upvotes: 6
Views: 1752
Reputation: 3624
I would just insert it as an iframe in html as in:
---
title: "Untitled"
author: "Ian Wesley"
date: "February 28, 2018"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
###App big
<iframe src ="https://gallery.shinyapps.io/087-crandash/" height=1000px width=1000px />
###App small
<iframe src ="https://gallery.shinyapps.io/087-crandash/" height=500px width=500px />
Which results in:
Upvotes: 7