Stabilize Function Arguments
Check if an object can be safely coerced to character
Check if an object can be safely coerced to double
Check if an object can be safely coerced to a factor
Check if an object can be safely coerced to integer
Check the size of an object
Abort with a standardized "must" message
Abort because an argument must not be NULL
Create a regex matching rule
Create a 'must not match' regex rule
Check character values against one or more regex patterns
Check double values against min and max values
Check that one value is not greater than another
Escape curly braces for safe printing with cli
Wrap text in cli markup
Core implementation for applying factor levels
Coerce to factor with specified levels
Coerce specified values to NA
Compile an error class
Define the main error message for a "must" error
Describe a character-based validation failure
Check if all elements of a list-like object are ish
Always return FALSE
Safely find failure locations in a vector
A wrapper for glue::glue with custom delimiters
Detect a regex pattern in a character vector
Check if a value is NULL and NULLs are allowed
Shared parameters for check functions
Shared parameters
Stabilize a scalar object of a specific class
Stabilize an object of a specific class
Signal an error with standards applied
Stop for bad factor levels
Abort with a standardized "can't coerce" message
Abort with an "incompatible type" message
Objects exported from other packages
Check if an object can be safely coerced to logical
Apply a single regex rule to a character vector
Check for character to double coercion failures
Check for values that would be lost during factor coercion
Check for character to integer coercion failures
Check for coercion failures and stop if any are found
Check for character to integer coercion failures
Check for NA values
Check if an object is a scalar
Coerce an object from a factor to a specific class
Coerce a list to a specific class
Coerce an object to a specific scalar class
Ensure an argument is NULL
Coerce an object from a complex to a numeric class
NULL-coalescing-like operator
Identify the class, type, etc of an object
Ensure an argument meets expectations
Ensure a character argument meets expectations
Ensure a double argument meets expectations
Ensure a factor argument meets expectations
Ensure an integer argument meets expectations
Ensure a logical argument meets expectations
stbl: Stabilize Function Arguments
A set of consistent, opinionated functions to quickly check function arguments, coerce them to the desired configuration, or deliver informative error messages when that is not possible.
Useful links