Function to retry failed functions after a time out of 5 seconds. Especially useful for failed api calls.
retry.Rd
Function to retry failed functions after a time out of 5 seconds. Especially useful for failed api calls.
Examples
retry(sum(1,"a"), max = 2)
#> api request failed, automatically retrying time 1/2 error received: Error in sum(1, "a"): invalid 'type' (character) of argument
#> api request failed, automatically retrying time 2/2 error received: Error in sum(1, "a"): invalid 'type' (character) of argument
#> [1] NA