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?
There are two ways to do this: Defining the application inline using the shinyApp() function; or. Referring to an external application directory using the shinyAppDir() function.
To change the output size you can use the corresponding LaTeX commands, set just before the code junk. The smallest option would be \tiny . For a full overview consider e.g. this. After the code junk it's important to set back to the size you used before, e.g. \normalsize .
RMarkdown is an extension to markdown which includes the ability to embed code chunks and several other extensions useful for writing technical reports. The rmarkdown package extends the knitr package to, in one step, allow conversion between an RMarkdown file (.Rmd) into PDF, HTML, word document, amongst others.
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:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With