I am building an app to analyze wind data using the packages “shiny” and “openair”.
I am trying to read the input data given by the user and use it as variables, but I keep getting:
Error in updateSelectInput(session, "pollutant", choices = names(df)) :
object 'session' not found
ERROR: [on_request_read] connection reset by peer
In the ui.r I have:
selectInput("pollutant", "Please choose pollutant", names(userdata))
and in the server.r:
observe({
df <- userdata()
str(names(df))
if (!is.null(df)) {
updateSelectInput(session, "pollutant", choices = names(df))
}
})
It sounds like you're not including the
session
variable in the server definition? i.e. use(input, output, session)
rather than just(input, output)
.