I am trying to solve a little problem in R about reading multiples files with the same name but allocated in different directories.
I have 100 files named R04
and with extension .xlsx
, but they are allocated in 100 different directories, like this:
file 1: C:\General Data\Month1\R04.xlsx
file 2: C:\General Data\Month2\R04.xlsx
.
.
.
file 100: C:\General Data\Month2\R04.xlsx
My problem is I can't get to read these files. Maybe it is possible to read they with for
, and due to the same name in 100 files I don't know if is possible to name each one with a number related to the month, for example in the case of first file the name should be 01
due to month 1, etc.