Adjust the size of the Shiny embedded application in the Rmarkdown document

I have a brilliant app hosted on shinyapps.io. I embed this in the html RMarkdown file using:

 ```{r}
knitr::include_app("shiny app web address")
```

This works, and I successfully see the built-in brilliant application, but I cannot adjust the width. include_app () has the ability to adjust the height, but I can not find an option to adjust the imframe width.

I 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 application are not configurable.

Does anyone have any ideas on adjusting the width of this embedded application?

Thanks for the help.

Edit: I also tried this: {r fig.width=16, fig.height=8}no luck. Any ideas?

+4
source share
1 answer

I would just embed 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 />

Result:

enter image description here

+3
source

Source: https://habr.com/ru/post/1690590/


All Articles