How can I read multiple files from multiple directories into R for processing?

后端 未结 4 1824
广开言路
广开言路 2021-02-09 04:10

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

4条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-09 04:44

    If you need to run the same analysis on each of the files, then you can access them in one shot using list.files(recursive = T). This is assuming that you have already set your working directory to Data Folder. The recursive = T lists all files within subdirectories as well.

提交回复
热议问题