retry | R Documentation |
try
that retries on failureThis is useful for functions that are "flaky", such as curl
, which may fail for unknown
reasons that do not persist.
retry(
expr,
envir = parent.frame(),
retries = 5,
exponentialDecayBase = 1.3,
silent = TRUE,
exprBetween = NULL,
messageFn = message
)
expr |
An expression to run, i.e., |
envir |
The environment in which to evaluate the quoted expression, default
to |
retries |
Numeric. The maximum number of retries. |
exponentialDecayBase |
Numeric > 1.0. The delay between
successive retries will be |
silent |
Logical indicating whether to |
exprBetween |
Another expression that should be run after a failed attempt
of the |
messageFn |
A function for messaging to console. Defaults to |
Based on https://github.com/jennybc/googlesheets/issues/219#issuecomment-195218525.
As with try
, so the successfully returned return()
from the expr
or a try-error
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.