Set-up
Before you begin
These exercises require you to be working in Quarto within an RProject, ideally the same RProject designed for this workshop (https://github.com/daniela-palleschi/publishr-workshop). Choose one of the two setup options below depending on your situation.
Option A: Use the workshop repository (recommended)
With Git
This requires Git to be installed. Check by running git --version in the terminal — if it is not installed, download it from git-scm.com.
Before cloning, decide whether to use HTTPS or SSH. If you are unsure, use HTTPS. SSH requires keys to be configured with GitHub but avoids needing to enter credentials each time.
- HTTPS URL:
https://github.com/daniela-palleschi/publishr-workshop.git - SSH URL:
git@github.com:daniela-palleschi/publishr-workshop.git
Via the terminal:
git clone https://github.com/daniela-palleschi/publishr-workshop.gitVia RStudio: File → New Project → Version Control → Git, then paste the URL into the dialog box.
Via Positron: File → New Folder from Git Repository, then paste the URL.
Without Git
- Go to github.com/daniela-palleschi/publishr-workshop
- Click the green Code button and select Download ZIP
- Unzip the folder somewhere sensible on your machine
After cloning or downloading
- Open
publishr-workshop.Rprojin RStudio or Positron - Copy your data file to
data/raw/(or use the sample dataset; see below) - Open
exercises/day1.qmdand work through the exercises
Option B: Set up your own RProject
If you would prefer to use your own project:
- Create a new RProject: File → New Project → New Directory → New Project
- Create the following folder structure in the terminal:
mkdir -p data/raw data/processed exercises output/figures output/tables output/models- Download the sample dataset (a subset from Palleschi et al. (2025); https://osf.io/6sra7) and save it to
data/raw/:
- Create a new Quarto document: File → New File → Quarto Document, and save it as
exercises/day1.qmd - Install the required packages:
install.packages("pacman")
pacman::p_load(here, tidyverse, gt, kableExtra, broom, modelsummary)The sample dataset used in these exercises is a subset of a reading time study with the following structure: one row per word region per trial per participant, with columns including px (participant ID), item (item ID), region (sentence region), tense, lifetime, gaze (first-pass reading time), tt (total reading time), rpd (regression path duration), first_fix (first fixation duration), and rating (plausibility rating, 1–7).
If you are using Option B and your data has different column names, adapt the code in the exercises accordingly. The key variables used are region, gaze, tt, and rating.