I have few files named "xxxxx yyy March 2019.csv, xxxxx yyy May 2020.csv " etc
I'm using this code to merge them all together:
files <- list.files(pattern = "*.csv")
df <- lapply(files, read_csv)
Bind <- bind_rows(df)
In this "Bind" dataset i want to create a column containing a month and a year (part of the name of original file) and i want to loop in in a manner that adding another file with similiar name format (maybe last 2 expressions, or somehow use date format) will automaticly update my dataframe.
No idea if that's even possible as i'm quite new to R but thank you in advance!