Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library('RISmed')
- getPubmedData <- function(searchString, fileName){
- print('Geting summary')
- search_query <- EUtilsSummary(searchString, retmax=100)
- summary(search_query)
- print("Retriving NCBI records")
- records<- EUtilsGet(search_query)
- class(records)
- pubmed_data <- data.frame('PMID'=PMID(records),'Title'=ArticleTitle(records),'Abstract'=AbstractText(records))
- print('Writing to file - PubmedData.csv')
- write.csv(pubmed_data, file = paste(fileName, '.csv'))
- return(pubmed_data)
- }
Add Comment
Please, Sign In to add comment