[R] Get articles from PudMed with a keyword – RISMed package

library("RISMed")
kc.pubmed<-getPubMed.mc("Clement Karine[au]")

Function:
getPubMed.mc<-function(query){
  
  res_search <- EUtilsSummary(query, type='esearch', db='pubmed')
  res_records<- EUtilsGet(res_search)
  res<-data.frame(cbind(PMID(res_records),
                        Year(res_records),
                        Month(res_records),
                        Day(res_records),
                        Author(res_records),                
                        ISSN(res_records),                
                        Title(res_records),
                        ArticleTitle(res_records),
                        ELocationID(res_records),
                        AbstractText(res_records),
                        Affiliation(res_records),
                        Language(res_records),
                        PublicationType(res_records),
                        MedlineTA(res_records),
                        NlmUniqueID(res_records),
                        ISSNLinking(res_records),
                        Hour(res_records),
                        Minute(res_records),
                        PublicationStatus(res_records),
                        ArticleId(res_records),
                        Issue(res_records),
                        ISOAbbreviation(res_records),
                        MedlinePgn(res_records),
                        CopyrightInformation(res_records),
                        Country(res_records),
                        GrantID(res_records),
                        Acronym(res_records),
                        Agency(res_records),
                        RegistryNumber(res_records),
                        RefSource(res_records),
                        CollectiveName(res_records),
                        Mesh(res_records)))
  
  res<-as.data.frame(res)
  colnames(res)<-c("PMID",
                   "Year",
                   "Month",
                   "Day",
                   "Author",
                   "ISSN",
                   "Title",
                   "ArticleTitle",
                   "ELocationID",
                   "AbstractText",
                   "Affiliation",
                   "Language",
                   "PublicationType",
                   "MedlineTA",
                   "NlmUniqueID",
                   "ISSNLinking",
                   "Hour",
                   "Minute",
                   "PublicationStatus",
                   "ArticleId",
                   "Issue",
                   "ISOAbbreviation",
                   "MedlinePgn",
                   "CopyrightInformation",
                   "Country",
                   "GrantID",
                   "Acronym",
                   "Agency",
                   "RegistryNumber",
                   "RefSource",
                   "CollectiveName",
                   "Mesh")
  
  rownames(res)<-res$PMID
  return(res)     
  
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s