EPM_retrieve_data | R Documentation |
Submit a Query to the NCBI ESearch Server, capture the response and retrieve the corresponding PubMed records from the NCBI EFetch Server. Up to the first n=10,000 records returned by the query will be retrieved (as per the NCBI policy). The operation must be completed within a user-defined timeout window otherwise it will be killed.
EPM_retrieve_data(
query_string,
api_key = NULL,
format = "xml",
encoding = "UTF-8",
timeout = 600,
batch_size = 500,
max_restart_attempts = 10
)
query_string |
String (character vector of length 1), corresponding to the query string. |
api_key |
String (character vector of length 1), corresponding to the NCBI API key. Can be NULL. |
format |
String (character vector of length 1), desired format of the Pubmed records. This must be one of the values in c("xml", "medline", "uilist"). |
encoding |
String (character vector of length 1), encoding of the resulting records (e.g., "UTF-8"). |
timeout |
Integer, time allowed for completing the operation (in seconds). |
batch_size |
Integer, max number of records to be retrieved as a batch. This corresponds to the "retmax" NCBI parameter. |
max_restart_attempts |
Integer, max number of attempts in case of a failed iteration. |
Character vector including the response from the server.
Damiano Fantini, damiano.fantini@gmail.com
https://www.data-pulse.com/dev_site/easypubmed/
# Note: a time limit can be set in order to kill the operation when/if
# the NCBI/Entrez server becomes unresponsive.
setTimeLimit(elapsed = 4.9)
try({
qry <- 'Damiano Fantini[AU] AND "2018"[PDAT]'
easyPubMed:::EPM_retrieve_data(qry, format = "uilist")
}, silent = TRUE)
setTimeLimit(elapsed = Inf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.