【发布时间】:2019-04-24 20:09:37
【问题描述】:
我正在尝试为我正在进行的项目创建仪表板。在这个项目中,我尝试使用renderUI 整合来自 tableau.public.com 的一些图。我希望仪表板使用selectInput 来选择要显示的画面图。我已经更改了下面的 URL,因此如果搜索它们将无法使用。
我当前的代码是:
plot1<-"https://public.tableau.com/views/Sheet2?:showVizHome=no&:embed=true"
plot2<-"https://public.tableau.com/views/Sheet3?:showVizHome=no&:embed=true"
fluidPage(
##### Give a Title #####
titlePanel("Tableau Visualizations"),
## Month Dropdown ##
selectInput("URL", label = "Visualization:",
choices = c(plot1,plot2), selected = plot1))
以及用于显示 Tableau 页面的代码:
renderUI({
tags$iframe(style="height:600px; width:100%; scorlling=yes", src=input$URL)
})
除了 selectInput 选项之外,代码执行我希望它执行的操作。我想让下拉菜单中的选项引用实际的绘图名称(plot1,plot2)。但是,由于它们是变量名称,因此实际的下拉菜单会列出 url。我不能使用以下内容,因为它不再将选择识别为变量:
## Month Dropdown ##
selectInput("URL", label = "Visualization:",
choices = c("plot1,"plot2"), selected = plot1))
无论如何我可以显示变量的名称,但不能显示它们所代表的 url?
谢谢
【问题讨论】:
标签: r shiny flexdashboard