Checks whether x is an object of length 1.
Usage
check_length1(x, x_name = substitute(x), error = TRUE)
Examples
check_length1(2)
#> Warning: `check_length1()` was deprecated in checkr 0.5.1.
#> ℹ Please use `chk::check_dim()` instead.
check_length1(1:2, error = FALSE)
#> Warning: 1:2 must have 1 element
check_length1(NULL, error = FALSE)
#> Warning: NULL must have 1 element
check_length1(list(), error = FALSE)
#> Warning: list() must have 1 element