Conventions

This book uses a small set of visual conventions.

In code blocks

  • Input lines carry no prefix.
  • Output lines are prefixed with #>. The whole block stays a valid R script: paste it into a console and it runs without error.
  • Numbered discs in the code gutter (1, 2, 3) are annotations. Hover or tap them to read the annotation, or read the numbered list below the block.

A minimal example:

library(dplyr)

penguins |>
  filter(!is.na(body_mass_g)) |>
  group_by(species) |>
  summarise(mean_mass = mean(body_mass_g))
1
Start the pipeline with the penguins data frame.
2
Drop rows with missing body-mass values.
3
Compute the species-level mean body mass.

In prose

  • Bold marks a term on its first use.
  • monospace marks code, file paths, and package names.
  • package::function() disambiguates function ownership when the package is not obvious from context.

Callouts

NoteNote

Clarification that is useful but not essential on first read.

TipVerification

A concrete check the reader should run. This is the book’s signature callout and appears after every non-trivial example.

WarningPitfall

A failure mode reported by past students of the course.

ImportantLLM prompt

An adversarial prompt for use with a language model, paired with an explicit verification step.