powered by
Try an expression a set number of times
tryn(expr, n = 10, silent = TRUE)
result of expr
expr
expression to evaluate
number of attempts until error
whether to suppress warnings
foo <- function() stop("I added an error") try(tryn(n = 10, foo()))
Run the code above in your browser using DataLab