retry.func.Rd
Retry function X times before stopping in error
retry.func(expr, isError = function(x) "try-error" %in% class(x), maxErrors = 5, sleep = 0)
expr | The function to try running |
---|---|
maxErrors | The number of times to retry the function |
sleep | How long to wait before retrying the function call |
retval returns the results of the function call
Retry function X times before stopping in error
# NOT RUN { dap <- retry.func( ncdf4::nc_open('https://thredds.daac.ornl.gov/thredds/dodsC/ornldaac/1220/mstmip_driver_global_hd_climate_lwdown_1999_v1.nc4'), maxErrors=10, sleep=2) # }# NOT RUN { # }