This repository contains an R Markdown slide deck and supporting R functions for dyadic data analysis. Use the sections below to keep contributions consistent and reproducible.
DyadicDataAnalysis.Rmdis the single format-aware source for both the interactive HTML slides and archival PDF.00_R_Functions/holds reusable R helpers (PrettyTables.R,ReportModels.R).Embed/stores bibliography/assets used by the slides.- Rendered artifacts live in
DyadicDataAnalysis.html,dyadic-data-analysis-tutorial.pdf, and their*_files/directories. renv/andrenv.lockpin package versions;brms_cache/keeps model cache files used by the slides.
renv::restore()installs the pinned R package set fromrenv.lock.quarto render DyadicDataAnalysis.Rmd --to revealjs --output DyadicDataAnalysis.htmlrebuilds the HTML slides.quarto render DyadicDataAnalysis.Rmd --to pdf --output dyadic-data-analysis-tutorial.pdfrebuilds the PDF output.- Optional (for Bayesian models):
cmdstanr::install_cmdstan()after installingcmdstanr.
- Follow tidyverse-style R conventions: 2-space indentation,
<-for assignment, andsnake_casefor objects and functions. - Keep roxygen2 headers on exported helpers in
00_R_Functions/. - Prefer explicit names (
is_prefix for dummy variables) and usedyadMLMfor data preparation instead of long custom chunks.
- Run
Rscript scripts/check-rmd.R(CI runs it on every push), then render the slides and check key figures/tables. - If you add tests, place them under
tests/testthat/withtest-*.Rnames and document how to run them.
- Recent history uses short, sentence-case messages (e.g., "added pdf version"); keep commits concise and descriptive.
- PRs should summarize changes, list any regenerated outputs (
DyadicDataAnalysis.html,dyadic-data-analysis-tutorial.pdf), and call out cache changes if they affect results.