docs<-list()
setwd("E:/test/");
dirlist<-dir();
voc<-c()
for(file in dirlist)
{
f<-paste(getwd(),'/',file,sep='')
data <- scan(f, what="")
data <- gsub("[^\w-]", "", data, perl=TRUE)
voc<-c(voc,data)
voc<-voc[!duplicated(voc)]
print(data)
df <- sort(table(tolower(data)))
print("---")
na<-names(df)
v<-c()
for(n in na)
{
v<-c(v,which(voc==n))
}
m<-rbind(v,df)
lt<-list(m)
print(m)
print(df)
docs <-append(docs,lt)
}
docs