server <- function(input, output, session) {
  data <- reactive({
    req(input$file)
    name <- input$file$name
    path <- input$file$datapath
    ext <- tools::file_ext(name)
    switch(ext,
      csv = vroom::vroom(path, ","),
      tsv = vroom::vroom(path, "\t"),
      validate("Invalid file")
    )
  })
  
  output$head <- renderTable({
    head(data(), input$n)
  })
}



 Many edges, difficult to anticipate reactivity behaviour
 Many edges, difficult to anticipate reactivity behaviour This “stringy” reactivity graph is easier to understand and debug
 This “stringy” reactivity graph is easier to understand and debug
