I have a shiny application which takes an input of a csv file.
I have a plotting function in server.R
myPlot <- function(data)
{This function uses the variables from the data frame in parenthesis. This data frame is the input from the uploaded file.}
Imagine if the data frame does not have the columns which are used by the function we will encounter an error in the shiny tab.
How does one handle such an error?
I would like to handle it by throwing a message stating "the following file is not compatible."