tryn {mark} | R Documentation |
Try an expression a set number of times
tryn(expr, n = 10, silent = TRUE)
expr |
expression to evaluate |
n |
number of attempts until error |
silent |
whether to suppress warnings |
result of expr
foo <- function() stop("I added an error")
try(tryn(n = 10, foo()))