闪亮的flexdashboard:下载报告

时间:2017-02-21 07:57:43

标签: shinydashboard flexdashboard

我想弄清楚是否有可能下载包含互动flexdashboard的报告?

我们确实可以使用ShinydownloadButton)下载报告,但flexdashboard文档中没有提及有关下载报告的信息(我只看到了下载数据等的例子,这很简单)。

flexdasboard的示例中的示例代码:

---
title: "Old Faithful Eruptions"
output: 
  flexdashboard::flex_dashboard:
    orientation: rows
    social: menu
    source_code: embed
runtime: shiny
---

```{r global, include=FALSE}
# load data in 'global' chunk so it can be shared by all users of the dashboard
library(datasets)
data(faithful)
```

Column {.sidebar}
-----------------------------------------------------------------------

Waiting time between eruptions and the duration of the eruption for the
Old Faithful geyser in Yellowstone National Park, Wyoming, USA.

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

sliderInput("bw_adjust", label = "Bandwidth adjustment:",
            min = 0.2, max = 2, value = 1, step = 0.2)
```

Column
-----------------------------------------------------------------------

### Geyser Eruption Duration

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

  dens <- density(faithful$eruptions, adjust = input$bw_adjust)
  lines(dens, col = "blue")
})
```

如果有人可以帮助插入基于downloadButton代码提供pdf报告的flexdasboard,那就太棒了。

有一个类似的问题to mine,但没有人回答。

0 个答案:

没有答案