R/predicates.R
is_scalar.Rd
Test whether x is of length 1
is_scalar(x)
Object to be tested.
Logical
is_scalar(1) # TRUE #> [1] TRUE is_scalar("a") # TRUE #> [1] TRUE is_scalar(c(1, 2)) # FALSE #> [1] FALSE