ncbiPMC <- function(term, ... )
{
if(length(term) > 1){ term <- paste(term, collapse = ",") }
# use efetch to get full text with retmode="xml"
term <- gsub("PMC", "", term)
# CHECK if IDs (and skip esearch)
if( grepl("^[0-9,]*$", term)){
x <- esummary(term, "pmc", version="2.0", parse=FALSE)
}else{
x <- esummary(esearch(term, "pmc"), version="2.0", parse=FALSE)
}
## Empty id list - nothing todo
if(class(x)[1]=="character"){
NULL
}else{
# authorsN=3, journalFull=TRUE
parse_pmc_XML(x, ...)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.