Skip to content
Prev 378737 / 398502 Next

Error trapping in R

Some use try blocks, like found in other languages.  Put the code you want to try inside the block.

https://www.robertknight.io/blog/try-blocks-in-r-for-error-handling/ contains a quick example.  The example doesn?t raise exceptions or anything, it just contains it for you so the script keeps going.  I like handling errors with if statements inside of try blocks.

Robert