Simple Assertions for Beautiful and Customisable Error Messages


[Up] [Top]

Documentation for package ‘assertions’ version 0.1.0

Help Pages

assert Assert that conditions are met
assertion_names List assertion names
assertion_tests Count tests per Assertion
assert_all_directories_exist Assert all files are directories
assert_all_files_exist Assert that all files exist
assert_all_files_have_extension Assert file extensions
assert_all_greater_than Assert input is greater than a specified minimum value
assert_all_greater_than_or_equal_to Assert input is greater than or equal to a specified minimum value
assert_character Assert input is a character vector
assert_character_vector Assert input is a character vector
assert_class Assert object belongs to class
assert_create Create an assertion function
assert_create_chain Create Chains of Assertions
assert_dataframe Assert input is a data frame
assert_directory_does_not_exist Assert a directory does not exist
assert_directory_exists Assert are directory exists
assert_equal Assert that the input objects are equal
assert_excludes Assert object does not include any illegal values
assert_factor_vector Assert input is a factor
assert_file_does_not_exist Assert a file does not exist
assert_file_exists Assert a file exists
assert_file_has_extension Assert file extensions
assert_flag Assert input is a scalar logical
assert_function Assert input is a function
assert_function_expects_n_arguments Assert function expects n arguments
assert_greater_than Assert input is greater than some minimum value
assert_greater_than_or_equal_to Assert input is greater than or equal to a specified minimum value
assert_identical Assert that the input object is identical to a specified value
assert_includes Assert object includes required
assert_int Assert input is an integer
assert_list Assert input is a list
assert_logical Assert input is logical
assert_logical_vector Assert input is an atomic logical vector
assert_matrix Assert input is a matrix
assert_names_include Assert that the input object includes a specified name
assert_non_empty_string Assert input is a non empty character string
assert_no_duplicates Assert that the input vector has no duplicates
assert_no_missing Assert that the input vector has no missing values
assert_number Assert input is a number
assert_numeric Assert input is numeric
assert_numeric_vector Assert input is a numeric vector
assert_reactive Assert that x is reactive
assert_string Assert input is a character string
assert_subset Check if a vector is a subset of another
assert_vector Assert input is a vector
assert_whole_number Assert that the input object is a whole number
check_all_assertions_are_tested_enough Check assertions are tested enough
common_roxygen_params Common Parameter Descriptions
excludes_advanced Check if an object does not contain prohibited elements
format_as_bullets Preprocess character vectors for cli::cli_abort()
format_inline Preprocess character vectors for cli package functions
has_all_names Check if a named object has all specified names
has_class Check object is some class
has_duplicates Check if a vector has duplicates
has_extension Title
has_missing_values Check if a vector has missing values
has_no_duplicates Check if a vector has no duplicates
has_no_missing_values Check if a vector has no missing values
includes Check if All Values in Required are in x
includes_advanced Check if an object contains required elements
is_character_vector Check if an object is a character vector
is_equal Check equality of two objects
is_flag Check if a value is a logical flag
is_flag_advanced Check if x is a flag
is_greater_than Check if a numeric vector is greater than a specified minimum value
is_greater_than_or_equal_to Check if a numeric vector is greater than or equal to a specified minimum value
is_identical Check if two objects are identical
is_list Check if a value is a list
is_logical_vector Check if an object is a logical vector
is_non_empty_string_advanced Check if x is a nonempty string
is_number Check if an object is a single number
is_number_advanced Check if x is a number
is_numeric_vector Check if an object is a numeric vector
is_reactive Check if a value is reactive
is_same_type Check equality of type
is_string Check if an object is a single string
is_string_advanced Check if x is a string
is_subset Check if one set is a subset of another
is_superset Check if one set is a superset of another
is_vector Check if an object is a vector This function checks if an object is a vector
setopts_are_equal Compare Sets for Equality
setopts_common_elements Find Common Elements
setopts_count_exlusive_to_first Count of Elements Exclusive to First Set
setopts_exlusive_to_first Elements Exclusive to First Set
util_count_duplicates Count the number of duplicated values in a vector
util_count_missing Count the number of missing values in a vector
util_get_duplicated_values Get the duplicated values in a vector