S4 versus S3

Which functional object system to use, S3 or S4?

  • S3 is a simple and flexible system.

    • Good for small teams who need flexibility and immediate payoffs.

    • Commonly used throughout base R and CRAN

    • Flexibility can cause problems, more complex systems might require formal conventions

  • S4 is a more formal, strict system.

    • Good for large projects and large teams

    • Used by Bioconductor project

    • Requires significant up front investment in design, but payoff is a robust system that enforces conventions.

    • S4 documentation is challenging to use.