I have a dataset in a data.table format that looks as such:
data.table
ID time.s time.e 1 1 2 2 1 4 3 2 3
Also, this works:
with(dat, time.s <= 1 & time.e >= 1)