Hi everybody,
I'm looking at data from a prison, where we have cell ids, seat id, entry data and time and exit date and time. Some of the cells were single cells, while others were doubles, but not all double cells had both beds occupied at all times.
For my analysis, I think it is important to control for people that had a mate in their cell. Thus, I'd like to find a code on how disentangle the date and time and find the overlapping time frames in the same cell. Is there a way to do this without having to check every cell manually?
The code looks the following way:

Thanks a lot for your help!
Best,
Arto
I'm looking at data from a prison, where we have cell ids, seat id, entry data and time and exit date and time. Some of the cells were single cells, while others were doubles, but not all double cells had both beds occupied at all times.
For my analysis, I think it is important to control for people that had a mate in their cell. Thus, I'd like to find a code on how disentangle the date and time and find the overlapping time frames in the same cell. Is there a way to do this without having to check every cell manually?
The code looks the following way:
Thanks a lot for your help!
Best,
Arto

Comment