Thank you for the help! As a follow up, what would be the syntax of filling in the multiple files names in the path section of the list.files code? ex: FilesNames <- list.files(path = "tripdat1.xlsx", "tripdat2.xlsx", "tripdat3.xlsx", etc., pattern - "xlsx$")
The path argument determines which directory will be searched for the files. The pattern argument determines, with a regular expression, which file names will be matched. I used xlsx$ so that every file whose name ends in xlsx will be listed. If you want only files whose name starts with tripdat and ends with xlsx, you could use pattern = "tripdat.*xlsx$". Regular expressions are very powerful and you can make complex criteria if you need to. If you get stuck coming up with the correct regular expression, please describe the file names you need to match and someone will probably be able to provide a regular expression.