3,500+ Downloads Later: The Engineering Behind the eyeris R package
eyeris [1][2] – a CRAN-published R package for reproducible pupillometry preprocessing with BIDS compliance, automated QC reports, and scalable pipeline tools.
Building for Reproducibility and Scale
When designing eyeris , I faced a unique engineering challenge: create a system that's both user-friendly for researchers with minimal programming experience, yet powerful and extensible enough for advanced computational users. Here's how I solved several key technical problems.
Architecture: The Pipeline Pattern
Design Philosophy
The core architectural pattern in eyeris is a functional pipeline where each preprocessing operation:
Takes an eyeris object as input
Applies a transformation to the pupil timeseries data
Records its parameters and provenance
Returns the modified eyeris object
This enables both pipe-based workflows ( %>% or |> ) and function composition while maintaining full traceability.
Figure 1: Diagram showing eyeris…