Learn R Programming

MultBiplotR (version 23.11.0)

CheckBinaryVector: Checks if a vector is binary

Description

Checks if all the entries of a vector are 0 or 1

Usage

CheckBinaryVector(x)

Value

The logical result

Arguments

x

he vector to check

Author

Jose luis Vicente Villardon

Examples

Run this code
x=c(0, 0, 0, 0,  1, 1, 1, 2)
CheckBinaryVector(x)

Run the code above in your browser using DataLab