Learn R Programming

rpubmed (version 0.1)

fetch_in_chunks: Downloads abstracts and Metadata from Pubmed, storing as R objects

Description

Splits large id vectors into a list of smaller chunks, so as not to hammer the entrez server!

Usage

fetch_in_chunks(ids, chunk_size = 500, delay = 0, ...)

Arguments

ids
integer Pubmed ID's to get abstracts and metadata from
chunk_size
Number of articles to be pulled with each call to pubmed_fetch (optional)
delay
Integer Number of hours to wait before downloading starts
...
character Additional terms to add to the request

Value

list containing abstratcs and metadata for each ID

Details

If you are making large bulk downloads, consider setting a delay so the downloading starts at off-peak USA times.

Examples

Run this code
## Not run: 
#  # Get IDs via rentrez_search:
#  plasticity_ids <- entrez_search("pubmed", "phenotypic plasticity", retmax = 2600)$ids
#  plasticity_records <- fetch_in_chunks(plasticity_ids)
# ## End(Not run)

Run the code above in your browser using DataLab