Skip to content

circadia-bio/syncR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

16 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ”„ syncR

syncR is the integrator and coordinator of the Circadia Lab R ecosystem.

License: MIT R R-CMD-check pkgdown


โš ๏ธ syncR is in early development and has not been formally tested. The API may change without notice and the package has not undergone peer review. Use with caution and verify outputs independently before using in any research context.


๐Ÿ“– What is syncR?

syncR provides a single, unified entry point for bringing together data across the Circadia Lab package ecosystem. It pulls sociodemographic and questionnaire data from tallieR, sleep diary data from slumbR, and actigraphy-derived circadian metrics from zeitR into one tidy, participant-indexed database.

syncR::sync() โ€” pulling everything into alignment, just like the SCN does.

Just as the suprachiasmatic nucleus (SCN) coordinates biological rhythms across the body, syncR coordinates data streams across the suite โ€” making cross-domain analysis (actigraphy vs. subjective sleep quality, circadian phase vs. demographics) effortless.

โœจ Features

  • ๐Ÿ”— One function, three sources โ€” sync() joins tallieR, slumbR, and zeitR outputs in a single call
  • ๐Ÿงฉ Flexible joining โ€” left, inner, or full join strategies to suit your study design
  • ๐Ÿชช Participant-indexed โ€” all outputs keyed on a shared participant ID column
  • ๐Ÿงน Tidy output โ€” returns a clean tibble ready for modelling or export
  • ๐Ÿ”ง Source-agnostic โ€” supply any combination of sources; omitted sources are silently ignored

๐Ÿ—‚๏ธ Project Structure

syncR/
โ”œโ”€โ”€ R/
โ”‚   โ”œโ”€โ”€ syncR-package.R         # Package-level documentation
โ”‚   โ””โ”€โ”€ sync.R                  # Core sync() function
โ”œโ”€โ”€ tests/
โ”‚   โ””โ”€โ”€ testthat/
โ”‚       โ””โ”€โ”€ test-sync.R         # Unit tests
โ”œโ”€โ”€ vignettes/
โ”‚   โ””โ”€โ”€ syncR.Rmd               # Getting started vignette
โ”œโ”€โ”€ .github/
โ”‚   โ””โ”€โ”€ workflows/
โ”‚       โ”œโ”€โ”€ R-CMD-check.yaml
โ”‚       โ””โ”€โ”€ pkgdown.yaml
โ”œโ”€โ”€ _pkgdown.yml
โ””โ”€โ”€ DESCRIPTION

๐Ÿš€ Getting Started

Prerequisites

  • R โ‰ฅ 4.1
  • dplyr, rlang, cli

Installation

# Install from GitHub
remotes::install_github("circadia-bio/syncR")

Basic usage

library(syncR)

db <- sync(
  tallie = tallieR::export(),   # sociodemographics + questionnaires
  slumb  = slumbR::export(),    # sleep diaries
  zeit   = zeitR::export()      # actigraphy + circadian metrics
)

Joining strategies

# Inner join โ€” only participants present in all sources
db <- sync(tallie = ..., slumb = ..., zeit = ..., join = "inner")

# Full join โ€” all participants, NAs where data is absent
db <- sync(tallie = ..., slumb = ..., zeit = ..., join = "full")

๐Ÿ“ฆ Dependencies

Package Role
dplyr Data frame joining
rlang Error handling and messaging
cli Formatted console output

๐Ÿ‘ฅ Authors

Role Name
Author & maintainer Lucas Franรงa
Author Mario Leocadio-Miguel

๐Ÿค Related Tools

  • ๐Ÿ›Œ slumbR โ€” sleep diary data collection and processing
  • โŒš๏ธ zeitR โ€” wrist actigraphy analysis and circadian rhythm metrics
  • ๐Ÿงฎ tallieR โ€” sociodemographic and questionnaire data management
  • ๐Ÿ”ฌ circadia-bio โ€” the Circadia Lab GitHub organisation

๐Ÿ“„ Licence

Released under the MIT License.

Copyright ยฉ Lucas Franรงa & Mario Leocadio-Miguel, 2025

About

๐Ÿ”„ syncR is the integrator and coordinator of the Circadia Lab R ecosystem.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages