Checks a set of variables are all of length one
Usage
check_single(
...,
.message = "`{param}` is not length one: ({err}).",
.env = rlang::caller_env()
)
Examples
a = 1
b = "Hello"
g = NA
check_single(a,b,g)
c= c(1,2,3)
d=list(a,b)
try(check_single(c,d,missing))
#> Warning: 1) 'missing' is not defined in this context
#> Error in .check_framework(..., predicate = predicate, convert = convert, :
#> 1) `c` is not length one: (list/vector input not allowed).
#> 2) `d` is not length one: (list/vector input not allowed).