Hi,
Recently, I have updated RStudio. I am facing a problem in reading multiple CSV files. It is showing NULL. Please, help me if I am doing something wrong.
I am using the following script--
The pattern argument of list.files() is a regular expression. The * by itself does not act as a wildcard; it means "zero or more of the preceding". Similarly, a . represents "any character". Placing *. before csv is not having the effect you want. I do not think that is the origin of the problem but let's clean that up just in case. If you want to search for csv at the end of the file name, place a $ after csv. The $ represents the end of the input.
Here is a series of trials I ran. Notice the last one where I search for a pattern that does not exist I get character(0) not NULL.
You said earlier that if you run list.files() you do see the csv files. Could you post that result, copied from the console? If it is too many files, just post a small section showing some of the csv files found.
I tried reading the CSV file by adding ---- "pattern = "csv$". Now I am able to read all files. Thank you so much for helping me I appreciate it. In the previous version of R, I was using " * .csv", but in a new version it is "csv$"
Finally worked