R/get_NMids.R

Defines functions get_NMids

Documented in get_NMids

get_NMids = function(x){
test1 = getURL(paste("https://www.ncbi.nlm.nih.gov/gene/?term=",x,sep=""))
test1a = htmlTreeParse(test1,useInternalNodes = TRUE)
test1b = lapply(getNodeSet(test1a,"//a"),function(x){xmlValue(x)})
resA = NULL; for (i in 1:length(test1b)){temp = test1b[[i]];temp1 = regexpr("NM_",temp);if (temp1!= -1)  resA = c(resA,test1b[[i]])}; return(resA)}

Try the pubmed.mineR package in your browser

Any scripts or data that you put into this service are public.

pubmed.mineR documentation built on Nov. 26, 2021, 5:11 p.m.