Skip to content
Prev 159560 / 398500 Next

Error reporting in R

On 20/10/2008 5:39 AM, A.Noufaily wrote:
Normally an error halts evaluation, but see ?try.  The basic pattern is

result <- try(mle(...))
if (inherits(result, "try-error")) return("Error")
else return(result)

Duncan Murdoch