has_names
tests if an object has names
lacks_names
tests if an object lacks names
Examples
set.seed(1)
x <- y <- runif(10)
names(x) = letters[1:10]
has_names(x) # TRUE
#> [1] TRUE
has_names(y) # FALSE
#> [1] FALSE
lacks_names(x) # FALSE
#> [1] FALSE
lacks_names(y) # TRUE
#> [1] TRUE