how can i open files contained in many subfolders

FIRST PROBLEM
I have to import a dataset contained in a foulder that have many sub folders.
I'll explain. I have the first folder (TEST) and I have 1000 folders inside. in each of the 1000 folders there is a .txt file (which contains the values ​​to be used as datasets). I would like to find a way to open all 1000 .txt files telling R that they are in "TEST".

SECOND PROBLEM
TEST is a .rar folder. can I import it on R without having to first unzip it?

Let keep one problem per question. There is already one for the RAR reading

About the reading of file within folder you could

  • use fs :package: to manipulate paths and select all the file you want to read
  • use purrr :package: to map the reading function to each element.
1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.