ropensci / europepmc

R Interface to Europe PMC RESTful Web Service
https://docs.ropensci.org/europepmc
28 stars 8 forks source link

When no results returned, package should still set hit count attribute (to 0) #56

Open arvi1000 opened 4 months ago

arvi1000 commented 4 months ago

At the moment when there are no results returned, md is set to NULL and the block is closed without setting the hit_count attr.

It would be good to add to add this line

attr(md, "hit_count") <- 0

before exiting

arvi1000 commented 4 months ago

I'd be happy to make this change, but I'm not sure of your contribution process. Should I fork the dev branch and then submit a PR?

njahn82 commented 3 months ago

Hi @arvi1000 Good catch, feel free to contribute a PR!

arvi1000 commented 3 months ago

Thanks. Filed a PR https://github.com/ropensci/europepmc/pull/58