I would like to display an error message in my shiny app if it's impossible to build the table (because of the selected criteria) :
output$tableau_taux <- renderTable({
tab_taux <- NULL
tab_taux <- tableau_taux_fonction(input$etab_id,input$pcs_id,input$retard_id,input$sexe_id)
validate(
need(!is.null(tab_taux), "Veuillez sélectionner d'autres critères")
)
tab_taux
})
This doesn't work, if the table is impossible to build then the R error message is displayed instead of the desired one :
Error : Problem with
filter()
input..1
. [34mi[39m Input..1
is&...
. [31mx[39m Input..1
must be of size 741 or 1, not size 0.