Overview
The throw sequence “423” is a valid pattern for juggling with three balls, but “432” will result in collisions and dropped balls. How can you tell? All juggling patterns can be described in a notation called siteswap, and siteswap sequences can be mathematically validated and visualised.
In this talk, I introduce jugglr, an R package for working with siteswap sequences. It validates sequences and prints their properties, generates timeline and ladder diagrams with ggplot2, and creates animated GIFs. You’ll learn something about juggling. But this is an R conference, not a juggling convention, so more importantly, you’ll learn about S7, the new(ish) Object Oriented Programming (OOP) system designed to combine the best of S3 and S4 whilst avoiding the pitfalls of each.
Juggling patterns turn out to be an ideal domain for S7. A siteswap’s validity, period, and number of props are all automatically derived from its throw sequence – a natural fit for S7’s computed properties. Input constraints like “a sequence must contain only alphanumeric characters” map directly to property validators. And the relationship between general siteswap patterns and specific types like vanilla, synchronous and multiplex siteswap is cleanly expressed through S7’s class hierarchy and factory constructors.
Using S7 in a package is not yet well-documented, so I’ll also share practical lessons from developing jugglr. You’ll leave with both an appreciation for the mathematics of juggling and the confidence to use S7 in your own packages.
Event details
Event: useR! 2026
Date: July 9th, 2026
Time: 10:50-11:10
Location: Aula Główna (SGH Warsaw School of Economics)
I gave an earlier versions of this talk at the University of Birmingham R User Group.
Key points
- There is a mathematics of juggling, made possible in part by the siteswap notation
- S7 is the future of Object Oriented Programming (OOP) in R
- S7’s validators and computed properties make it well-suited to working with siteswap sequences
- Using S7 is packages is (fairly) new
- The jugglr package provides tools for validating and visualising juggling sequences.
- Juggling is fun, and so is S7!
Slides
Keyboard shortcuts for slideshow (once you’ve clicked inside it):
Use ← and → to navigate through the slides
Use o for an overview of all slides
Use ? for an overview more keyboard shortcuts
Click the hamburger menu in the bottom left corner of the slide deck for more options
- f to toggle full screen doesn’t work from this page. Go to slides and use that shortcut from there instead
Reuse
Citation
@online{kaye2026,
author = {Kaye, Ella},
title = {Juggling with {S7}},
date = {2026-07-09},
url = {https://ellakaye.co.uk/talks/2026-07-09_juggling-with-s7/},
langid = {en}
}