Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make an interactive isoslides presentation using Shiny and Rmarkdown?

When I make a Shiny app in an .Rmd file to make an isoslides presentation, the app "behaves" like a static html page (interactivity is not possible).

For example, the following code in an Rmd file will produce a static html presentation that you can not interactively use.

---
output: ioslides_presentation
---

## Useless App

```{r echo=FALSE, message=FALSE, warning=FALSE}
library(shiny)

ui = fluidPage(
        numericInput("n", "How old are you?", value = 1)
)

server = function(input, output, session) {
        
}

shinyApp(ui, server)

What am I missing?

like image 836
bird Avatar asked Nov 17 '25 00:11

bird


1 Answers

The above answer is inaccurate.

For your YAML header

---
output: ioslides_presentation
runtime: shiny
---

To embed your shiny app (assuming it is a separate file):

```{r, echo = FALSE, message=F, warning=FALSE}
shinyAppFile(
  "FileMyAppIsIn/app.R",
  options = list(width = "100%", height = 700)
)
``
like image 180
kpr62 Avatar answered Nov 18 '25 15:11

kpr62



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!