Checks if a vector is binary
Checks if all the entries of a vector are 0 or 1.
BinaryVectorCheck(x)
x |
The vector to check |
The logical result.
Jose luis Vicente-Villardon
x=c(0, 0, 0, 0, 1, 1, 1, 2) BinaryVectorCheck(x)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.