Tests if an object is a single negative number

is_single_negative(x)

Arguments

x

an R object

Examples

is_single_negative(1.0)  # FALSE
#> [1] FALSE
is_single_negative(-1.0)  # TRUE
#> [1] TRUE
is_single_negative(c(-1.0,-2))  # FALSE
#> [1] FALSE
is_single_negative(0)  # FALSE
#> [1] FALSE
is_single_negative(NA)  # FALSE
#> [1] FALSE