R/Sub.filename.R

Sub.filename<-function(filename){
   if(grepl(".xls",filename)){
      name<-sub(".xls","",filename)
   }
   
   if(grepl(".xlsx",filename)){
      name<-sub(".xlsx","",filename)
   }
   
    if(grepl(".csv",filename)){
      name<-sub(".csv","",filename)
   }
   
   return(name)
}

Try the Biocomb package in your browser

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

Biocomb documentation built on May 1, 2019, 9:38 p.m.