Skip to contents

Checks

prettycheck includes four main types of functions: test_*(), check_*(), assert_*(), and expect_*(). The test_*() functions return a logical flag; the check_*() functions return TRUE or throw a warning message as a string if the condition is not met; and the assert_*() and expect_*() functions return the input object or throw an error if the condition is not met.

assert_color() experimental
Assert a color input
assert_color_options() experimental
Assert special color inputs
assert_ggplot_label() experimental
Assert the validity of a ggplot2 label
check_data() test_data() assert_data() experimental
Check if a dataset exists in a package
check_duration() test_duration() assert_duration() expect_duration() experimental
Check if an argument is a Duration object
check_empty() test_empty() assert_empty() experimental
Check if an argument has zero length
check_hms() test_hms() assert_hms() expect_hms() experimental
Check if an argument is a hms object
check_identical() assert_identical() test_identical() experimental
Check if multiple objects are identical
check_interactive() test_interactive() assert_interactive() experimental
Check if R is being used interactively
check_internet() test_internet() assert_internet() experimental
Check for internet connectivity
check_interval() test_interval() assert_interval() expect_interval() experimental
Check if an argument is an Interval object
check_length() assert_length() test_length() experimental
Check if an argument has a specific length
check_not_empty() test_not_empty() assert_not_empty() experimental
Check if an argument has length greater than zero
check_namespace() test_namespace() assert_namespace() expect_namespace() experimental
Check if a namespace is loaded
check_numeric() assert_numeric() test_numeric() experimental
Check if an argument is a numeric object
check_period() test_period() assert_period() expect_period() experimental
Check if an argument is a Period object
check_pick() assert_pick() test_pick() experimental
Check how many arguments were picked
check_posixt() test_posixt() assert_posixt() expect_posixt() experimental
Check if an argument is a POSIXt object
check_scalar() test_scalar() assert_scalar() expect_scalar() experimental
Check if an argument is a scalar object
check_scientific_notation() test_scientific_notation() assert_scientific_notation() expect_scientific_notation() experimental
Check if a numeric vector is in scientific notation
check_temporal() test_temporal() assert_temporal() expect_temporal() experimental
Check if an argument is a temporal object