【发布时间】:2018-01-30 17:00:40
【问题描述】:
我想知道,是否可以在闪亮的服务器模块中使用省略号 (...)。我认为问题是我不能在服务器模块中调用反应值(因为它通常用括号完成 - value() )。
试图使省略号反应 ...() 也没有成功。有人知道如何解决这个问题吗?
提前致谢!
renderPlotsUI = function(id) {
ns = NS(id)
tagList(plotOutput(ns("plot")))
}
renderPlots = function(input, output, session, FUN, ...) {
output$plot = renderPlot({FUN(...)})
}
# APP BEGINS
ui = fluidPage(
renderPlotsUI("plot1")
)
server = function(input, output, session) {
callModule(renderPlots, "plot1", FUN=plot, x = reactive(mtcars))
}
shinyApp(ui, server)
【问题讨论】: