1

我正在尝试将 GoogleVis 与新包FlexDashboard一起使用,这就像基本 .Rd 和 shinyDashboards 之间的交集。它基本上是一个不发光的仪表板。

无论如何,我正在尝试嵌入一个 googleVis 对象,默认情况下似乎不支持,但我可以让 html 显示在输出中,所以一定有办法!我们能想出一些技巧吗?也许结合plot()renderGvis()结合某种黑客?Ormessing 与设置op <- options(gvis.plot.tag='chart')

我失败了,但也许其他人可以解决?

4

1 回答 1

3

Building on the awesome answer from Michal Majka at Conditional reactive logic shiny based flexdashboard you can do something like this

---
title: "Test gvisTable"
output: 
  flexdashboard::flex_dashboard:
    orientation: rows

runtime: shiny
---

```{r setup, include=FALSE}
library(flexdashboard)
library(googleVis)

```

Column {data-height=350}
-----------------------------------------------------------------------

### Chart c

```{r}
#create a ui interaction:
uiOutput("dynamic")

#render the ui:
output$dynamic <- renderUI({ 
   htmlOutput("myTable")
})

#here is your server activity:
output$myTable <- renderGvis({    
    gvisTable(Population )       
  })
```
于 2017-02-09T18:00:13.987 回答