rOpenHealth / rpubmed

Tools for extracting and processing Pubmed and Pubmed Central records.
42 stars 23 forks source link

Starting value for entrez_search #11

Closed chartgerink closed 10 years ago

chartgerink commented 10 years ago

Hi,

I am using the rpubmed package (latest dev version from github) to retrieve links to articles and download the HTML subsequently. To create a more stable function, I want to retrieve the ids from entrez_search() in incremental steps (e.g., 1-1000 first, then 1001-2000, etc). However, I cannot find the argument where I can specify the starting number for the returns of the search (e.g., 1001). Is there a way to specify it?—if so, what is the argument?

It is a very tiny question, but I could not find it anywhere.

Best and thanks for the awesome package, Chris

sckott commented 10 years ago

Hey @chartgerink , Will get back to you asap...S

DASpringate commented 10 years ago

Hi @chartgerink You can pass any of the arguments in the original api to entrez_search www.ncbi.nlm.nih.gov/books/NBK25499/#_chapter4ESearch

So, a retstart argument to entrez_search to give you something like:

plasticity_ids <- entrez_search("pubmed", "phenotypic plasticity", retmax = 2600, retstart = 500)$ids Should work for you.

chartgerink commented 10 years ago

Thanks! I will make sure the package is cited when we try to publish our findings. :+1:

DASpringate commented 10 years ago

On 07/10/2013 15:57, Chris Hartgerink wrote:

Thanks! I will make sure the package is cited when we try to publish our findings. :+1:

— Reply to this email directly or view it on GitHub https://github.com/ropensci/rpubmed/issues/11#issuecomment-25815314.

Great! Let me know when you do!