powered by
Test whether x is of length 1
is_scalar(x)
Object to be tested.
Logical
# NOT RUN { is_scalar(1) # TRUE is_scalar("a") # TRUE is_scalar(c(1, 2)) # FALSE # }
Run the code above in your browser using DataLab