【问题标题】:Slide in R as interactive dashboard作为交互式仪表板滑入 R
【发布时间】:2018-10-12 07:08:21
【问题描述】:

在 R 演示文稿中不可能有一张幻灯片,比如 ioslides,这是一个交互式仪表板吗?在 Rstudio 中,flexdashboard 必须作为不同的文件打开,并且 Shiny 仪表板不会在幻灯片演示中运行。谢谢

【问题讨论】:

标签: r shiny flexdashboard


【解决方案1】:

您可以在文档标题中使用runtime: shiny

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

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```

## Slide {.smaller}

### Here are two Shiny widgets

```{r echo = FALSE}
selectInput("n_breaks", label = "Number of bins:",
              choices = c(10, 20, 35, 50), selected = 20)

```

### ...that build a histogram.

```{r echo = FALSE}
renderPlot({
  hist(faithful$eruptions, probability = TRUE, 
       breaks = as.numeric(input$n_breaks),
       xlab = "Duration (minutes)", 
       main = "Geyser eruption duration")
})
```

结果是一张带有交互式selectInput 的幻灯片,允许更改直方图的中断:

您可以在此处找到更多详细信息:https://shiny.rstudio.com/articles/interactive-docs.html

【讨论】:

    猜你喜欢
    • 2012-12-07
    • 2015-04-21
    • 1970-01-01
    • 1970-01-01
    • 2023-01-19
    • 2015-08-04
    • 2019-08-01
    • 1970-01-01
    • 2010-11-03
    相关资源
    最近更新 更多