App 2: Select data (SERVER)

The module server uses get() to retrieve the dataset return a reactive value rather than defining some output.

datasetServer <- function(id) {
  moduleServer(id, function(input, output, session) {
    reactive(get(input$dataset, "package:datasets"))
  })
}