Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 2.07 KB

File metadata and controls

29 lines (23 loc) · 2.07 KB

Repository Guidelines

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.

Project Structure & Module Organization

  • DyadicDataAnalysis.Rmd is 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/ and renv.lock pin package versions; brms_cache/ keeps model cache files used by the slides.

Build, Test, and Development Commands

  • renv::restore() installs the pinned R package set from renv.lock.
  • quarto render DyadicDataAnalysis.Rmd --to revealjs --output DyadicDataAnalysis.html rebuilds the HTML slides.
  • quarto render DyadicDataAnalysis.Rmd --to pdf --output dyadic-data-analysis-tutorial.pdf rebuilds the PDF output.
  • Optional (for Bayesian models): cmdstanr::install_cmdstan() after installing cmdstanr.

Coding Style & Naming Conventions

  • Follow tidyverse-style R conventions: 2-space indentation, <- for assignment, and snake_case for objects and functions.
  • Keep roxygen2 headers on exported helpers in 00_R_Functions/.
  • Prefer explicit names (is_ prefix for dummy variables) and use dyadMLM for data preparation instead of long custom chunks.

Testing Guidelines

  • 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/ with test-*.R names and document how to run them.

Commit & Pull Request Guidelines

  • 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.