Re: [R] Read in files in r

2016-11-08 Thread Jim Lemon
Hi lily, My first guess is that the errors are due to trying to open a file like: "fold1/file1.txt" as: "file1.txt" That is, your code will generate filenames in the directories fold1,..., without prepending the folder names. Maybe: result_list<-list() read_dirs<-paste("fold",1:3,sep="")

[R] Read in files in r

2016-11-08 Thread lily li
Hi R users, In the current directory, there are several folders (such as fold1, fold2, fold3, etc.), while each folder includes the same named files, such as file1.txt, file2.txt, file3.txt, etc. The structures of each folder and each file are the same, but with different values. I want to read