designing-oop-r
Installation
SKILL.md
Designing OOP R
This skill covers object-oriented programming in R, including S7, S3, S4, and vctrs-based classes.
Decision Tree: What Are You Building?
1. Vector-like objects (behave like atomic vectors)
Use vctrs when:
- Need data frame integration (columns/rows)
- Want type-stable vector operations
- Building factor-like, date-like, or numeric-like classes
- Need consistent coercion/casting behavior
- Working with existing tidyverse infrastructure
Examples: custom date classes, units, categorical data
2. General objects (complex data structures, not vector-like)
Related skills