I used this R code to read in 800 similar CSV files from one folder. All the Column headers are the same. The files name contain the ID of the data e.g. 2.csv, 5.csv, ... 5691.csv , 5780.csv, etc.
PSnow_dat <- list.files(pattern = "*.csv") %>%
map_df(~fread(.))
the scrip combines all files into one dataframe, does it read the data in the correct order?
I accually want to have the names of the file ( the ID of the data) as one column in my dataframe! Can anyone help?