I am running a simulation study and need to process and save the results from several text files. I have the data organized in such a way where there are sub directories and wit
filenames <- list.files("path/to/files", recursive=TRUE) This will give you all the files residing under one folder and sub folders under it.
filenames <- list.files("path/to/files", recursive=TRUE)