powered by
Checks if all the entries of a vector are 0 or 1.
BinaryVectorCheck(x)
The vector to check
The logical result.
# NOT RUN { x=c(0, 0, 0, 0, 1, 1, 1, 2) BinaryVectorCheck(x) # }
Run the code above in your browser using DataLab