...

/

Other Methods for Exception Handling

Other Methods for Exception Handling

In this lesson, we mention some other functions that can be useful while handling exceptions.

Function to Handle Exceptions

Other methods can be used to handle exceptions in R.

Here is a minimal list of functions that can help programmers in handling errors and warnings in code:

  • warning(...) — to generate warnings
  • stop(...) — to generate errors
  • suppressWarnings(expression) — to evaluate the given expression and ignore any warnings
  • tryCatch(...) — we have already studied this in detail here

Let’s have a look at each one of them in ...