rOpenSci package or resource used*
URL or code snippet for your use case*
Link to a blog post, a gist, or an academic paper, or provide some code inline
Sector
List one of: academic / industry / government / non-profit / other
Other
Field(s) of application
e.g. ecology, epidemiology, Antarctic and Southern Ocean research, biomedical research, energy, finance, history, social sciences, anything!
Air quality (exposure science? epidemiology?)
What did you do?
Explain briefly what you did, to pique your readers’ interest
The retry()
method in crul::HttpClient
replaced my own code for retrying in case of failures in my rOpenSci ropenaq
package that provides access to data from OpenAQ API (air quality data).
I had code with a while
loop, counting iterations, adding waiting time, etc., and it turns out I didn’t need to! Using the method from crul
I’m saving lines of code and the responsability for testing the retrying is at least partly on crul
maintainer.
Comments
e.g. feedback or feature request
Thanks @sckott for telling me about the method. I should read the docs and the changelog more closely!
Twitter handle
if you would like to be tagged in a tweet about your use case
@ma_salmon
(but the more general post is via @rhub_
).