Identifies contiguous sleep episodes based on temporal gaps between valid sleep minutes. A new block is begins whenever the time difference between consecutive sleep records exceeds specified threshold. Function provides start and end times for each block and indicates whether they contain 'main' sleep.
Value
tbl. A dataframe summarized at the sleep-block level, with the following columns:
participant_id: participant identifierblock_id: identifier for each sleep blockblock_start: Start timestamp of each continous sleep block.block_end: End timestamp of each continous sleep block.main_block: Logical indicator of whether the block contains any main sleep.duration_min: Duration of each sleep block in minutes.sleep_date: Sleep-aligned date based on specifiedoffset.