tryn: Try an expression a set number of times

View source: R/tryn.R

trynR Documentation

Try an expression a set number of times

Description

Try an expression a set number of times

Usage

tryn(expr, n = 10, silent = TRUE)

Arguments

expr

expression to evaluate

n

number of attempts until error

silent

whether to suppress warnings

Value

result of expr

Examples

foo <- function() stop("I added an error")
try(tryn(n = 10, foo()))

mark documentation built on May 29, 2024, 5:13 a.m.

Related to tryn in mark...