πŸ”„ 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

πŸ—‚οΈ 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

Installation

# Install from GitHub
# remotes::install_github("circadia-bio/syncR")
install.packages("syncR", repos = c('https://circadia-bio.r-universe.dev', 'https://cloud.r-project.org'))

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

πŸ“„ Licence

Released under the MIT License.

Copyright Β© Lucas FranΓ§a & Mario Leocadio-Miguel, 2025