SUBSTR<- function(X,S,E){
if(length(unique(nchar(X)))>1)stop("warning")
if(unique(nchar(X))<max(S,E)|min(S,E)<=0)stop("warning")
temp<-t(sapply(X,function(X){mapply(substr,X,start=S,stop=E)}))
dimnames(temp)<-NULL
temp
}