Exception handling in R
exception, r
Solution
Besides Shane's answer pointing you to other StackOverflow discussions, you could try a code search feature. This original answer pointed to Google's Code Search has since been discontinued, but you can try
- Github search as e.g. in this query for tryCatch in language=R;
- Ohloh/Blackduck Code search eg this query for tryCatch in R files
- the Debian code search engine on top of the whole Debian archive
Just for the record, there is also `try` but `tryCatch` may be preferable. I tried a quick count at Google Code Search but try gets too many false positives for the verb itself -- yet it seems `tryCatch` is more widely used.
Problem
Does anyone have examples/tutorials of exception handling in R? The official documentation is very terse.