문제

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).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top