types-check

Official

Validate R function inputs with standalone checks.

Authorr-lib
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill provides a centralized, opinionated approach to validating function inputs in R by using a standalone file of check_* helpers. It helps packages enforce consistent, clear error messages at the boundary between user code and internal logic, reducing boilerplate.

Core Features & Use Cases

  • Scalar validators: check_string, check_number_whole, check_name, check_bool, check_number_decimal
  • Vector validators: check_character, check_logical, check_data_frame, and nuanced NA handling with allow_na
  • Support for NULL through allow_null, and guidance on warning about invalid inputs at the entry point
  • Clear guidance on wrapping existing check_ functions and propagating caller context to preserve accurate error reporting

Quick Start

Use the tidy-argument-checking approach to add a standalone file of check_* helpers to your package, then validate inputs at the start of exported functions.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: types-check
Download link: https://github.com/r-lib/cpp11/archive/main.zip#types-check

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.