Package: zeitR 0.1.8

Lucas França

zeitR: Actigraphy Data Parsing and Analysis for R

Provides tools for importing, parsing, and analysing raw actigraphy data from wrist-worn devices. Implements a full sleep analysis pipeline — off-wrist detection, main sleep period detection, nap detection, and WASO computation — validated epoch-for-epoch against the Condor circadiaBase Python reference pipeline using ActTrust hardware. Also computes standard non-parametric circadian rhythm variables (interdaily stability, intradaily variability, relative amplitude, L5, M10). Device-specific parameter presets can be swapped to adapt the pipeline to other actigraph models. Designed to complement slumbR in the Circadia Lab ecosystem.

Authors:Lucas França [aut, cre], Mario Leocadio-Miguel [aut], Julia Ribeiro da Silva Vallim [aut]

zeitR_0.1.8.tar.gz
zeitR_0.1.8.zip(r-4.7-x86_64)zeitR_0.1.8.zip(r-4.7-arm64)zeitR_0.1.8.zip(r-4.6-x86_64)zeitR_0.1.8.zip(r-4.6-arm64)zeitR_0.1.8.zip(r-4.5-x86_64)
zeitR_0.1.8.tgz(r-4.6-x86_64)zeitR_0.1.8.tgz(r-4.6-arm64)zeitR_0.1.8.tgz(r-4.5-x86_64)zeitR_0.1.8.tgz(r-4.5-arm64)
zeitR_0.1.8.tar.gz(r-4.7-arm64)zeitR_0.1.8.tar.gz(r-4.7-x86_64)zeitR_0.1.8.tar.gz(r-4.6-arm64)zeitR_0.1.8.tar.gz(r-4.6-x86_64)
zeitR_0.1.8.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
zeitR/json (API)

# Install 'zeitR' in R:
install.packages('zeitR', repos = c('https://circadia-bio.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/circadia-bio/zeitr/issues

Pkgdown/docs site:https://zeitr.circadia-lab.uk

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

cpp

4.54 score 1 scripts 44 exports 24 dependencies

Last updated from:d082073114 (on v0.1.8). Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK373
linux-devel-x86_64OK444
source / vignettesOK476
linux-release-arm64OK389
linux-release-x86_64OK401
macos-release-arm64OK405
macos-release-x86_64OK1062
macos-oldrel-arm64OK454
macos-oldrel-x86_64OK716
windows-devel-arm64OK761
windows-devel-x86_64OK691
windows-release-arm64OK805
windows-release-x86_64OK572
windows-oldrel-x86_64OK488
wasm-releaseOK126

Exports:actogram_coloursacttrust_paramscheck_consistencycirc_mean_hcirc_sd_hclassify_pa_countsclassify_pa_intensityclassify_sleep_episodescompute_activity_countscompute_cosinorcompute_cpd_metricscompute_lidscompute_lricompute_npcracompute_sleep_metricscompute_sricompute_wasodetect_lids_boutsdetect_naps_crespodetect_offwrist_bimodaldetect_sleep_crespoestimate_eeexport_hypnogramextract_sleep_episodesfit_lidslabel_stateslids_transformpa_equationsplot_actogramplot_actogram_activityplot_actogram_doubleprepare_actigraphyread_actigraphyread_actigraphy_dirread_acttrustread_axivityrun_pipelinerun_pipeline_batchrun_pipeline_nativerun_pipeline_native_batchscore_epochs_cole_kripkestudy_lids_metricsstudy_sleep_metricsstudy_summary

Dependencies:clicpp11dplyrgenericsgluelifecyclelubridatemagrittrmclustpillarpkgconfigpurrrR6Rcpprlangstringistringrtibbletidyrtidyselecttimechangeutf8vctrswithr

Single-recording sleep analysis
1. Read the recording | 2. Run the full pipeline | 3. Nightly sleep statistics | Timestamp issues | 4. Actogram | 5. Circadian rhythm analysis (NPCRA) | Next steps

Last update: 2026-08-24
Started: 2026-06-23

LIDS: ultradian sleep-cycle dynamics from actigraphy
The pipeline in one call: compute_lids() | Under the hood: a clean synthetic example | From activity to LIDS: lids_transform() | Where bouts come from | Quality filtering | Study-level summaries | Next steps

Last update: 2026-07-29
Started: 2026-07-29

From raw accelerometry to PIM/TAT/ZCM activity counts
The processing chain | A synthetic recording | GT3X+-style filtering instead of ActTrust-style | From counts to PA intensity | Tuning zcm_threshold / tat_threshold | Next steps

Last update: 2026-07-20
Started: 2026-07-20

Physical activity intensity from ActTrust/GT3X+ counts
The equation | Estimating METs from counts | Classifying PA intensity | Applying it to a real recording | Choosing an equation set | Next steps

Last update: 2026-07-20
Started: 2026-07-20

Actogram visualisation
Setup | Single-column actogram | Double-plotted actogram | Activity double-plotted actogram | Colour customisation | Inspecting the default palette | Overriding individual colours | Suppressing naps | Date labels and font size | Adding ggplot2 layers | Working with a bare tibble | Choosing between the three variants | Next steps

Last update: 2026-07-09
Started: 2026-07-09

Classifying free days: weekends and public holidays
Holiday formats | The no-holidays warning | Passing holidays to the pipeline | Auto-forwarding with S3 dispatch | Effect on metrics | Batch studies spanning multiple years | Non-standard schedules with free_days | Summary | See also

Last update: 2026-07-08
Started: 2026-07-08

The Vallim pipeline: native sleep classification
Background | The rule set | Basic usage | Comparing the two pipelines | Sleep onset and offset statistics | Advanced: running each step directly | Batch processing | Next steps

Last update: 2026-07-08
Started: 2026-07-07

Getting started with zeitR
What is zeitR? | Installation | Reading a single recording | The $epochs tibble | The $metadata list | Running the full pipeline | Nightly sleep statistics | Timestamp issues | Running pipeline steps individually | Next steps

Last update: 2026-06-20
Started: 2026-06-19

Non-parametric circadian rhythm analysis
Overview | The five variables | Interdaily stability (IS) | Intradaily variability (IV) | Relative amplitude (RA) | L5 and M10 | Computing NPCRA | Interpretation example | Customising window widths | Using raw data frames | Batch NPCRA across a study | References

Last update: 2026-06-20
Started: 2026-06-20

Study-level analysis
Overview | Reading a directory of files | Participant-level summary | Column reference | Running the full pipeline across a study | Combining NPCRA and sleep statistics | Tips | Further reading

Last update: 2026-06-20
Started: 2026-06-20

Readme and manuals

Help Manual

Help pageTopics
Default state colour palette for actogram plotsactogram_colours
ActTrust device parameter presetacttrust_params
Check actigraphy timestamps for consistency issuescheck_consistency
Circular mean of clock times in decimal hourscirc_mean_h
Circular standard deviation of clock times in decimal hourscirc_sd_h
Classify physical activity intensity directly from activity countsclassify_pa_counts
Classify physical activity intensity from METsclassify_pa_intensity
Classify sleep episodes as main or secondary (native pipeline)classify_sleep_episodes
Compute PIM, TAT, and ZCM activity counts from raw triaxial accelerationcompute_activity_counts
Cosinor rhythmometry (Cornelissen 2014)compute_cosinor
Compute CPD, MSF, MSW, MSFsc, SJL, and SJLacompute_cpd_metrics compute_cpd_metrics.default compute_cpd_metrics.zeitr_result
Compute LIDS ultradian-rhythm parameters for every sleep boutcompute_lids
Light Regularity Index (LRI)compute_lri
Non-parametric circadian rhythm analysis (NPCRA)compute_npcra
Compute sleep metrics split by day typecompute_sleep_metrics compute_sleep_metrics.default compute_sleep_metrics.zeitr_result
Sleep Regularity Index (SRI)compute_sri
Compute WASO and nightly sleep statisticscompute_waso
Detect nighttime sleep bouts via the Roenneberg relative-immobility methoddetect_lids_bouts
Detect secondary sleep periods (naps) using the Crespo nap algorithmdetect_naps_crespo
Off-wrist detection using the Condor bimodal activity/temperature modeldetect_offwrist_bimodal
Detect main sleep periods using the Crespo algorithmdetect_sleep_crespo
Estimate energy expenditure (METs) from activity countsestimate_ee
Export a zeitR pipeline result as a hypnoR-compatible hypnogramexport_hypnogram
Extract sleep episodes from a CSPD-scored epoch tableextract_sleep_episodes
Fit a sloped cosine to a LIDS profile, scanning candidate periodsfit_lids
Convert integer epoch states to a labelled factorlabel_states
Apply the LIDS (Locomotor Inactivity During Sleep) transformlids_transform
Published activity-count equations for estimating METs and PA intensitypa_equations
Plot a single-column actogramplot_actogram
Plot a double-plotted actogram with activity barsplot_actogram_activity
Plot a double-plotted actogramplot_actogram_double
Prepare a raw actigraphy tibble for analysisprepare_actigraphy
Read an actigraphy file into a zeitr_recording objectread_actigraphy
Read all actigraphy files in a directoryread_actigraphy_dir
Read a Condor Instruments ActTrust actigraphy fileread_acttrust
Read an Axivity AX3/AX6 .cwa file into a zeitR-standard epoch tibbleread_axivity
Run the full actigraphy sleep analysis pipelinerun_pipeline
Run the pipeline on all files in a directoryrun_pipeline_batch
Run the Vallim native actigraphy sleep analysis pipelinerun_pipeline_native
Run the native pipeline on all files in a directoryrun_pipeline_native_batch
Score actigraphy epochs as wake or sleep using the Cole-Kripke algorithmscore_epochs_cole_kripke
Batch LIDS ultradian-rhythm summary across a studystudy_lids_metrics
Batch sleep-timing and chronotype metrics across a studystudy_sleep_metrics
Summarise a zeitr_study across participantsstudy_summary