I have a code where I make requests for an API using the jsonlite package.
My request is:
aux <- fromJSON (www ... js)
The problem is that there is a time limit on requests and sometimes the error is returned:
*Error in open.connection (con, "rb"): HTTP error 429.*
I need that, when there is an error the code wait X seconds and make a new request and this is repeated until I get the requested data.
I found the try and tryCatch functions and the retry package. But I couldn't make it work as I need it.