This skill provides standardized guidance for implementing input validation in R packages following the tidyverse and rlang style guides. It leverages a specialized suite of type-checking functions to ensure function arguments meet specific criteria—such as being a single string, a whole number, or a logical vector—while generating user-friendly error messages that correctly identify the calling function. This skill is essential for R developers aiming to implement robust 'fail-fast' principles at their package boundaries, ensuring that internal helper functions can operate on trusted data without redundant runtime checks.
主な機能
01Advanced argument matching and exclusivity checks for complex API designs
02Precise control over NULL and NA handling through standardized arguments
03Comprehensive scalar validation for booleans, strings, names, and numeric types
04Context propagation techniques to ensure error messages point to the correct entry point
05Vector-level type checking for logical, character, and data frame objects
06225 GitHub stars
ユースケース
01Building robust exported functions for R packages with professional error reporting
02Creating custom domain-specific validation helpers that integrate with the R error system
03Refactoring legacy R validation logic to modern tidyverse and rlang standards