Reputation: 73
I have two dataframes with the exact same two columns each: a column with as.POSIXct time, and a column with a value for each timestamp.
Here they are:
DF1:
TIME OBJECT
1 1899-12-31 00:00:00 formes aimantées
2 1899-12-31 00:00:00 dinette thés
3 1899-12-31 00:00:01 dinette thés
4 1899-12-31 00:00:01 formes aimantées
5 1899-12-31 00:00:02 dinette thés
8 1899-12-31 00:00:02 boite
...
And DF2:
TIME OBJECT
1 1899-12-31 00:00:00 formes aimantées
2 1899-12-31 00:00:01 indéfini
3 1899-12-31 00:00:01 dinette thés
4 1899-12-31 00:00:02 boite
5 1899-12-31 00:00:02 dinette thés
8 1899-12-31 00:00:03 indéfini
...
I would like to create a third dataset with Time and the overlap between df1 and df2, to highlight when the same object is simultaneously present on both sides. The ultimate goal is to create a plot like the following, specifically the third (inferior row).
Thanks!
Upvotes: 0
Views: 38