Software
sloop

sloop

S language OOP ⛵️

R

sloop is an R package that provides interactive tools for exploring and understanding object-oriented programming in R, with a focus on the S3 system. It helps developers inspect method dispatch, function types, and class relationships during development and debugging.

The package solves the problem of S3’s often opaque behavior by making method dispatch visible and traceable. Key features include s3_dispatch() which shows exactly which methods are considered and called for any function, support for complex dispatch scenarios like group generics and NextMethod(), and utilities to identify function types (ftype()), object types (otype()), and enumerate all methods for a class or generic. This makes it particularly useful for understanding how S3 works under the hood and debugging method dispatch issues.

Contributors