I cannot understand what the problem with naming the variable var in exercise 2 and why does it suggest that the code will fail? I tried it in R with the following code and it works:
library(shiny)
ui <- fluidPage(
textInput("var","var")
)
server <- function(input, output, session) {
var <- reactive(df[input$var])
range <- reactive(range(var(), na.rm = TRUE))
}
shinyApp(ui, server)
https://mastering-shiny.org/basic-reactiercisesvity.html#ex-4
Thank you