R/Yearwise.R

setGeneric("Yearwise", function(object,year) standardGeneric("Yearwise"));
setMethod("Yearwise", "Abstracts", function(object, year)
{
tempj=object@Journal;
tempk=regexpr(as.character(year), tempj, ignore.case=FALSE);
templ=which(tempk != -1);
if(length(templ)==0)
{print(paste("No abstracts found for the term",year,sep =" ")); 
write(paste("No abstracts found for the term",year,sep =" "), file = "dataout.txt", append = T)}
else {print(paste(length(templ),"abstracts",year, sep = " "));
write(paste(length(templ),"abstracts",year, sep = " "), file = "dataout.txt", append = T)} })

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.