I have about 200 txt files with different name, any file have diferent number of dimensions. The code for read is ok:
setwd("C:/...")
filelist<-list.files(pattern="*.txt")
for (j in 1:length(filelist)) assign(filelist[j], read.csv(filelist[j], header=TRUE))
But I want a loop about to read all of the above files and data variable to gets each file each time.
for (file in filelist){
data[file]<-file
Do something with data
e.g. log(data[,6]
}
From the above the output from data is
"NameFile.txt"
The problem is that in this way does not read the data set just the name of data. There is a way to to chase away the ""
or something else?