try_retry: Convenience function that tr

Description Usage Arguments Value See Also Examples

View source: R/functions.R

Description

Convenience function that tr

Usage

1
try_retry(expr, when = "error", ...)

Arguments

expr

An expression to be evaluated

when

Condition under which to retry, see retry::retry()

...

Additional arguments for retry::retry()

Value

The result of the try() call, i.e. the value of the expression being evaluated, or an object of class "try-error".

See Also

try_read_html()

Examples

1
2
3
4
failed(try_retry(sqrt("a")))
# This one won't get any better just by repeating its
# evaluation but maybe if a webpage can't be read,
# it's worth a second try...

alexanderbrenning/alexmisc documentation built on Jan. 7, 2022, 5:41 p.m.