Checks if a vector is binary
Checks if all the entries of a vector are 0 or 1
CheckBinaryVector(x)
x
The logical result
Jose luis Vicente Villardon
x=c(0, 0, 0, 0, 1, 1, 1, 2) CheckBinaryVector(x)
Useful links