retry: Retry a function in cas of failure A function to restart a...

Description Usage Arguments Value

View source: R/retry.R

Description

Retry a function in cas of failure A function to restart a function in case of failure (source StackOverflow)

Usage

1
2
3
4
5
6
retry(
  expr,
  isError = function(x) "try-error" %in% class(x),
  maxErrors = 5,
  sleep = 0
)

Arguments

expr

expression to be evaluated

isError

error control function

maxErrors

Maximum number of possible failures

sleep

time in seconds between two attempts

Value

the results of expr


supertux83/rccs documentation built on Aug. 1, 2020, 11:53 p.m.