What problem does it solve?
This Skill helps you choose and apply the correct R object-oriented programming approach (S7, S3, S4, or vctrs) so your classes are structured, validated, and integrated with the way you actually use data.
Core Features & Use Cases
- S7 guidance for new, structured class designs: Use formal class definitions with property validation and safe access via
@, plus multiple dispatch and explicit inheritance.
- vctrs guidance for vector-like, type-stable systems: Build classes that behave like atomic vectors and integrate cleanly with data frames and tidyverse-style casting/coercion.
- S3 vs S4 decision support and patterns: Pick lightweight S3 for simplicity or compatibility, and prefer S4 when working within Bioconductor ecosystems or when you need S4-specific features.
- Migration strategy: Evaluate S3→S7, S4→S7, and base→vctrs pathways based on complexity and compatibility needs.
Quick Start
Ask an AI to recommend an R OOP approach for your project, including which of S7, S3, S4, or vctrs best matches your data shape and validation/coercion requirements, and to outline a minimal starting template accordingly.