Test whether x is of length 1
Examples
is_scalar(1) # TRUE
#> [1] TRUE
is_scalar("a") # TRUE
#> [1] TRUE
is_scalar(c(1, 2)) # FALSE
#> [1] FALSE
Test whether x is of length 1
is_scalar(1) # TRUE
#> [1] TRUE
is_scalar("a") # TRUE
#> [1] TRUE
is_scalar(c(1, 2)) # FALSE
#> [1] FALSE