I have a shiny app which calls an external function based on user input. This function updates a data frame based on the input so it can be used to render a plot.
getData function()
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) })
})
No matter what I try I just can't seem to get the shinyServer to call the function and update a df. Could someone advise what am doing wrong? Appreciate any help.