tryn {mark}R 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()))

[Package mark version 0.8.0 Index]