Imagine a function that causes stop:
f <- function(x) { if (x == 42) stop("x cannot be 42, x is ", x, " instead") x }
Imagine a process that calls that function:
xs <- c(1, 2, 4, 8, 16, 32, 42, 64) for (x in xs) { print(f(x)) }
Running this code fill stop the program. Here is to check for this:
xs <- c(1, 2, 4, 8, 16, 32, 42, 64) for (x in xs) { tryCatch( print(f(x)), error = function(e) print(e) ) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.