r-oop
R Object-Oriented Programming
S7, S3, S4, and vctrs: choosing the right OOP system for your needs
S7: Modern OOP for New Projects
- S7 combines S3 simplicity with S4 structure
- Formal class definitions with automatic validation
- Compatible with existing S3 code
# S7 class definition
Range <- new_class("Range",
properties = list(
start = class_double,
end = class_double
),
validator = function(self) {
if (self@end < self@start) {
More from ab604/claude-code-r-skills
tidyverse-patterns
Modern tidyverse patterns for R including pipes, joins, grouping, purrr, and stringr. Use when writing tidyverse R code.
38r-style-guide
R style guide covering naming conventions, spacing, layout, and function design best practices. Use when writing R code.
27r-performance
R performance best practices including profiling, benchmarking, vctrs, and optimization strategies. Use when optimizing R code.
22rlang-patterns
rlang metaprogramming patterns for data-masking, injection operators, and dynamic dots. Use when writing functions that use tidy evaluation.
22r-package-development
R package development guide covering dependencies, API design, testing, and documentation. Use when developing R packages.
22tdd-workflow
Test-driven development workflow for R using testthat. Use when writing new features, fixing bugs, or refactoring code. Enforces test-first development with 80%+ coverage.
17