【发布时间】:2015-09-03 08:48:15
【问题描述】:
我有一个闪亮的应用程序,它根据用户输入调用外部函数。此函数根据输入更新数据框,因此可用于渲染绘图。
getData 函数()
getData= function(inpName)
{
// a piece of code based on inpName
}
shinyUI.R
library(shiny)
shinyUI(fluidPage(
titlePanel("title"),
sidebarLayout(
sidebarPanel(
textInput("name","Enter a name")),
mainPanel())
))
shinyServer.R
library(shiny)
shinyServer(function(input,output)
{
getData=reactive({getData(input$name) })
})
无论我尝试什么,我似乎都无法让 shinyServer 调用该函数并更新一个 df。有人可以建议做错了什么吗?感谢任何帮助。
【问题讨论】:
标签: r shiny shiny-server