In my Shiny app I am reading an Excel file with read_excel. If during the upload a warning appears I need to capture all warning in a list so that I can process the list any further. However, the current approach with tryCatch does not work.
Here is my code (in the Shiny server module):
data <- reactive({(
req(input$file1)
inFile <- input$file1
browser()
data <- tryCatch(read_excel(inFile$datapath, 1),
warning <- function(war){
message(war)
})
})
Thank you very much!