Skip to contents

favr 2.0.0

CRAN release: 2026-08-20

Refactor of the package to focus on function argument validation through “check” functions that throw an error if validation fails and return NULL (or occasionally the input) invisibly if validation succeeds.

New Features

General Validation

  • abortif() and abortifnot() functions to check conditions and error if a condition is TRUE or FALSE, respectively.
  • check() function to check conditions using tidy eval and error if a condition is TRUE.
  • check_with() function to check conditions in a data-masked context and error if a condition is TRUE.
  • walk_check() function to walk a predicate over a vector and error if any element fails the check.

Type and Class Validation

Type Validation

OOP Type Validation

S3 Type Validation

Check Modifiers

  • bare() modifier to check for bare objects (i.e. objects with no class attribute) in the type check functions, or bare S3 objects (where the expected S3 class is first in the class attribute vector) in the S3 type check functions.

  • at_least(), at_most(), and in_range() modifiers to check for ranges in length/number of rows/number of columns.

Scalar Value Validation

Forbidden Values Validation

Property Validation

File and Directory Validation

  • check_dir() and check_file() functions to check if a directory or file exists and error if it does not.
  • check_ext() function to check the file extension of a file/path and error if it does not match the specified extensions.

Questioning

Removed the online documentation for enforce(), schema(), add_to_schema(), enforce_schema(), and the associated casting and recycling helpers (cast(), lossy(), recycle() and coerce()).

Soft-Deprecated

Bug Fixes

favr 1.0.0

CRAN release: 2025-12-15

  • Added a NEWS.md file to track changes to the package.