You're using input$choose_age
, but choose_age
isn't the name of your selectInput
; it's the name of your uiOutput
, that happens to contain your selectInput
. The name of your actual selectInput
is selected_age
(so, input$selected_age
).
I'd also strongly encourage you to clean up your indentation! It will help greatly the next time you forget a closing brace or whatever. You can easily do this in RStudio by doing Ctrl+a (select all), Ctrl+i (auto-indent).