Skip to content

Instantly share code, notes, and snippets.

View strengejacke's full-sized avatar
⁉️
Focusing

Daniel strengejacke

⁉️
Focusing
View GitHub Profile
@strengejacke
strengejacke / intersectional.R
Created June 9, 2023 06:13
Example for building intersectional strata
easystats::install_latest(force= TRUE)
library(datawizard) # data wrangling and preparation
library(parameters) # model summaries
library(glmmTMB) # multilevel modelling
# sample data set
data(efc, package = "ggeffects")
efc <- efc |>
# numeric to factors, set labels as levels
library(easystats)
library(palmerpenguins)
library(lme4)
library(ggplot2)
# data generation -----------------------
data(penguins)
d <- penguins |>
@strengejacke
strengejacke / gist:bd14a299a806d5e2d03347d5c274a7f9
Created May 6, 2024 06:14
Compile R Report (HTML/PDF/Word file from R scripts)
#' ---
#' title: "Compile Report"
#' author: ""
#' date: ""
#' ---
#' Comments that are to be displayed as normal text are marked with `#'`
#' at the beginning of the line. Comments that are to be displayed as
#' code are marked with `#` at the beginning of the line.