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 the files from each folder, but can't get it to work. Could you please tell me why? Thanks.
rd1 = read.table(file=list.files('fold1')[1], head=T) rd2 = read.table(file=list.files('fold1')[2], head=T) rt1 = read.table(file=list.files('fold2')[1], head=T) rt2 = read.table(file=list.files('fold2')[2], head=T) Then there are the warning sign that 'cannot open file 'file1.txt': No such file or directory' [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.