Generates weekly sleep summaries from daily Fitbit sleep data.
Source:R/scores_nt_fitbit.R
compute_fitbit_sleep_week.RdThis wrapper function applies a standardized weekly aggregation pipeline
using compute_fitbit_weekly_summary() and the summarize_sleep() function
to compute weekly sleep metrics at the participant-session level.
Only days passing minimum quality control thresholds (qc_300min) are
included in the weekly aggregation.
Value
tbl. Weekly sleep dataset containing:
Week identifiers (
wk,wk_type)Day counts (
n_day,n_wkdy,n_wknd)Sleep timing metrics (bed/sleep onset and offset)
Sleep duration and stage summaries
Heart rate–derived sleep metrics
Wake-after-sleep-onset metrics
Weekly quality control flag (
qc_wk)