powered by
Checks if all the entries of a vector are 0 or 1
CheckBinaryVector(x)
The logical result
he vector to check
Jose luis Vicente Villardon
x=c(0, 0, 0, 0, 1, 1, 1, 2) CheckBinaryVector(x)
Run the code above in your browser using DataLab