R/funcsAnnotation.R

Defines functions getAbstractByPMID

Documented in getAbstractByPMID

getAbstractByPMID <- function(pmID){
	pmXML <- annotate::pubmed(pmID)
	pmRoot <- xmlRoot(pmXML)
	numAbst <- length(pmRoot)
	abstracts <- vector("list", length=numAbst)
	for(i in 1:numAbst){
	  abstracts[[i]] <- buildPubMedAbst(pmRoot[[i]])
	}
	names(abstracts) <- pmID
	return(abstracts)
}
Accio/RpsiXML documentation built on May 7, 2021, 12:08 a.m.