Skip to content

circadia-bio/syncR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”„ syncR

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

License: MIT R R-CMD-check pkgdown


πŸ“– 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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages