I have a list of objects (dataset 1), where each dataframe has the following structure, and where the filename corresponds to the ID (e.g: ID1.dat):
date
2018-10-23 20:20:00
2018-10-23 20:21:00
2018-10-23 20:22:00
2018-10-23 20:23:00
2018-10-23 20:24:00
2018-10-23 20:25:00
...................
and the other dataset is this dataframe (dataset 2):
ID date date2
ID1 2019-03-15 09:43:30 2019-03-15 09:53:30
ID2 2019-03-16 21:26:00 2019-03-16 21:36:00
ID3 2019-03-17 10:25:40 2019-03-17 10:35:40
ID4 2018-10-30 08:27:30 2018-10-30 08:37:30
ID5 2018-10-30 16:57:10 2018-10-30 17:07:10
ID6 2018-11-05 08:31:20 2018-11-05 08:41:20
... ....................
My goal is to create a new column at the end of each dataframe of the list (dataset 1) named 'match', that indicates if 'date' variable is between ‘date’ and ‘date2’ of the dataset 2, based on the ID.
Can someone help me?
Thank you very much! :)