R/head_abbrev.R

Defines functions head_abbrev

Documented in head_abbrev

head_abbrev = function(limits,term,pmid,abs){if (missing(limits)) limits = 50;test = pmids_to_abstracts(pmid,abs); test1 = gregexpr(term,test@Abstract,fixed=T); if (test1[[1]] != -1)  {test1a = NULL; for (i in 1:length(test1[[1]])){test1a = c(test1a,substr(test@Abstract,test1[[1]][i]-limits,test1[[1]][i]+limits))}; return(test1a) } else return("match not found")}

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.