Jor*_*rge 6 r knitr r-markdown shiny
我在 Shinyapps.io 上托管了一个闪亮的应用程序。我使用以下命令将其嵌入到 html RMarkdown 文档中:
```{r}
knitr::include_app("shiny app web address")
```
Run Code Online (Sandbox Code Playgroud)
这有效,我成功地看到了嵌入式闪亮的应用程序,但我无法调整宽度。include_app() 有一个调整高度的选项,但我找不到调整 imframe 宽度的选项。
我试过这个:
```{r}
knitr::opts_chunk$set(fig.width=16, fig.height=8)
knitr::include_app("shiny app web address")
```
Run Code Online (Sandbox Code Playgroud)
但是应用程序的宽度和高度不会调整。
有没有人对如何调整这个嵌入式应用程序的宽度有任何想法?
谢谢您的帮助。
编辑:我也试过这个:{r fig.width=16, fig.height=8}没有运气。有任何想法吗?
我只是将它作为 iframe 插入到 html 中,如下所示:
---
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 />
Run Code Online (Sandbox Code Playgroud)
结果是: