Package: slumbR 0.1.0
slumbR: Sleep Diaries Helper Package for R
A companion package for the Sleep Diaries app (https://sleepdiaries.circadia-lab.uk). Provides tools to import participant JSON exports, compute standard sleep variables (sleep onset latency, total sleep time, sleep efficiency, WASO, etc.), re-score validated sleep questionnaires (ESS, ISI, DBAS-16, MEQ, PSQI, RU-SATED, STOP-BANG, MCTQ), and assemble tidy study-level data frames ready for downstream analysis.
Authors:
slumbR_0.1.0.tar.gz
slumbR_0.1.0.zip(r-4.7)slumbR_0.1.0.zip(r-4.6)slumbR_0.1.0.zip(r-4.5)
slumbR_0.1.0.tgz(r-4.6-any)slumbR_0.1.0.tgz(r-4.5-any)
slumbR_0.1.0.tar.gz(r-4.7-any)slumbR_0.1.0.tar.gz(r-4.6-any)
slumbR_0.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION
card.svg |card.png
slumbR/json (API)
| # Install 'slumbR' in R: |
| install.packages('slumbR', repos = c('https://circadia-bio.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/circadia-bio/slumbr/issues
Pkgdown/docs site:https://slumbr.circadia-lab.uk
Last updated from:3bb8deb763 (on main). Checks:7 NOTE, 2 OK. Indexed: yes.
| Target | Result | Time | Files | Syslog |
|---|---|---|---|---|
| linux-devel-x86_64 | NOTE | 136 | ||
| source / vignettes | OK | 204 | ||
| linux-release-x86_64 | NOTE | 190 | ||
| macos-release-arm64 | NOTE | 182 | ||
| macos-oldrel-arm64 | NOTE | 142 | ||
| windows-devel | NOTE | 69 | ||
| windows-release | NOTE | 71 | ||
| windows-oldrel | NOTE | 92 | ||
| wasm-release | OK | 109 |
Exports:available_instrumentscompute_sleep_varsdiary_longdiary_wideread_exportread_studyscore_all_questionnairesscore_questionnairestudy_summary
Dependencies:clicpp11dplyrgenericsgluejsonlitelifecyclelubridatemagrittrpillarpkgconfigpurrrR6rlangstringistringrtibbletidyrtidyselecttimechangeutf8vctrswithr
Readme and manuals
Help Manual
| Help page | Topics |
|---|---|
| List available questionnaire instruments | available_instruments |
| Compute derived sleep variables from raw morning diary answers | compute_sleep_vars |
| Extract the long-format diary data frame from a study or export | diary_long diary_long.data.frame diary_long.slumbr_export diary_long.slumbr_study |
| Pivot diary entries to wide format — one row per participant per night | diary_wide |
| Read a single Sleep Diaries JSON export | read_export |
| Read a directory of Sleep Diaries JSON exports into a study object | read_study |
| Re-score all questionnaires in a study or export | score_all_questionnaires |
| Score a Sleep Diaries questionnaire from raw answers | score_questionnaire |
| Summarise a study's diary data at the participant level | study_summary |
