Group 2: Exercise 2 (App)

NumericSummaryApp <- function() {
  
  ui <- fluidPage(
    titlePanel("Apply any filter"),
    sidebarLayout(
      sidebarPanel(
        datasetInput("dataset", filter = is.data.frame),
        numericVarSelectInput("numeric_col")
      ),
      mainPanel(
        summaryOutput("summary_list")
      )
    )
  )
  
  
  server <- function(input, output, session) {
    
    selected_df <- datasetServer("dataset")
    numeric_var <- numericVarSelectServer("numeric_col", selected_df)
    
    summaryServer("summary_list", numeric_var$value)
    
  }
  
  shinyApp(ui, server)
  
}