I have a shiny app where I call a function from a different package. So when I call this function if the values are not in a certain range that function throws an error and the app stops.
Eg function :
data <- callFunction(cost,input1,input2)
So when the callFunction throws an error it stops the app. I dont want the app to stop and just throw a message on the app saying your inputs are incorrect please modify it. How can I do this in a shiny app.Thank you.
If you know what input values are not correct, validate them before passing further.
You can use req(), validate-need or simple if-else statements.
It would be easier if you give us some example which is not working for you as expected.