ropensci / rentrez

talk with NCBI entrez using R
https://docs.ropensci.org/rentrez
Other
195 stars 38 forks source link

extract_form_esummary should work on a single esummary #64

Closed dwinter closed 9 years ago

dwinter commented 9 years ago

By default, entrez_summary returns a single record when only one ID is passed and a list of such records for multiple IDs. At the moment extract_form_esummary, which basically wraps sapply/lapply throws errors when it encounters a single esummary record.

Although this behavior can vbe changed with always_return_list, it would make sense for extract_form_esummary to handle single records cleanly -- either by making extract_form_esummary a generic with methods for esummaries and esummary_lists or some if() statements in the current function