How to join 2 data tables by time interval and summarize overlapping and non-overlapping time periods by factor variable
问题 I have 2 data tables, each lists periods of observation effort, and type of effort (A,B,C). I would like to know the duration of time for the overlapping and non-overlapping periods of effort. I've tried to do this with data.table and foverlaps, but can't figure out how to include all the non-overlapping periods. Here is my example data. I first created 2 data tables containing periods of effort. My dataset will include periods of time when a single observer is on effort. library(data.table)