Find the section related to your variable type or use case, run through the checklist to help you think about what state your variable should be in, then add some assertions to your code.
is_numeric
, is_character
, is_data.frame
, coerce_to
, etc.)is_scalar
, is_empty
, is_non_empty
, use_first
, has_dims
, DIM
, etc.)is_na
, is_not_na
)NULL
allowed? (is_null
, is_not_null
)has_duplicates
, has_no_duplicates
)has_any_attributes
)is_finite
, is_infinite
, is_nan
, is_not_nan
, etc.).is_in_range
, is_positive
, is_percentage
, etc.)is_complex
, is_real
, is_imaginary
)is_whole_number
, is_integer
)is_divisible_by
, is_even
, is_odd
)is_empty_character
, is_missing_or_empty_character
, is_not_missing_nor_empty_character
)is_factor
, and base::factor
)is_email_address
, is_credit_card_number
, is_uk_postcode
, is_us_zip_code
, and many more)is_valid_variable_name
, is_valid_r_code
)is_existing_file
, is_dir
)is_readable_file
, is_writable_file
, is_executable_file
)is_readable_connection
, is_writable_connection
)is_windows
, is_linux
, is_mac
, is_solaris
, is_unix
)standardize_path
in pathological
, in_dir
in devtools
)PATH
environment variable have an effect? (is_on_os_path
)r_has_png_capability
, r_has_jpeg_capability
, r_has_tiff_capability
)