pubmedR icon indicating copy to clipboard operation
pubmedR copied to clipboard

article is lost by pmApiRequest

Open ideophone opened this issue 2 years ago • 1 comments

For some reason that I haven't been able to narrow down any further, a certain article, "Mapping Evidence on the Burden of Breast, Cervical, and Prostate Cancers in Sub-Saharan Africa: A Scoping Review.", is lost by pmApiRequest().

This is my code (corresponding pubmed search in a web browser: https://pubmed.ncbi.nlm.nih.gov/?term=breast+Cancer+Incidence+Mortality+Years+of+Life+Lost+Years+Lived+With+Disability+Disability-Adjusted+Life+Years):

library(pubmedR)
library(bibliometrix)

api_key <- NULL

query <- "(breast Cancer Incidence Mortality Years of Life Lost Years Lived With Disability Disability-Adjusted Life Years) OR ((Evaluating Family History Links between Breast Cancer and Prostate Cancer Among PLCO Trial Participants.) AND (Abdel-Rahman O[Author]))"

res <- pmQueryTotalCount(query = query, api_key = api_key)
articles <- pmApiRequest(query = query, limit = res$total_count, api_key = api_key)

The last line generates the comment: "Documents 47 of 47" in the RStudio Console. And

articles$total_count

results in 47. But running

articles_df <- pmApi2df(articles)
nrow(articles_df)

results in 46 only. And comparing the pubmed search result in a web browser with the contents of the result of pmApiRequest (for example by means of

sink("articlesXML.txt")
print(articles)
sink()

and the find function in a text editor), shows that the one above mentioned review article is lost.

It must have something to do with that specific article, for running a query for only that article

query <- "(Mapping Evidence on the Burden of Breast, Cervical, and Prostate Cancers in Sub-Saharan Africa: A Scoping Review.) AND (Musekiwa[Author])"

res <- pmQueryTotalCount(query = query, api_key = api_key)
articles <- pmApiRequest(query = query, limit = res$total_count, api_key = api_key)

results in an Error:

Error: HTTP failure: 400 <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE eEfetchResult PUBLIC "-//NLM//DTD efetch 20131226//EN" "https://eutils.ncbi.nlm.nih.gov/eutils/dtd/20131226/efetch.dtd"> <eFetchResult> <ERROR>Cannot retrieve history data: OUT OF RANGE. Parameter retstart=1 + 1 is greater than number of records available in history. History includes 1 IDs.</ERROR> </eFetchResult>

ideophone avatar Jul 18 '22 21:07 ideophone

I'm experiencing the same problem.

leandrorodriguess avatar Feb 16 '24 00:02 leandrorodriguess