Implement Shiny apps embedded as iframes in knitr

This commit is contained in:
Joe Cheng
2014-03-31 10:03:22 -07:00
parent 6d7818962e
commit cc3cd2c141
8 changed files with 238 additions and 19 deletions

View File

@@ -0,0 +1,23 @@
# Subapp test
This is an R Markdown document that contains several embedded Shiny apps.
```{r}
library(shiny)
shinyAppDir(
system.file("examples/01_hello", package="shiny"),
options=list(
width="100%", height=250
)
)
shinyAppObj(
ui = fluidPage(
numericInput("n", "n", 1),
plotOutput("plot")
),
server = function(input, output) {
output$plot <- renderPlot( plot(head(cars, input$n)) )
},
options=list(width=450)
)
```