Learn R Programming

thinkr (version 0.16)

is.01: does this vector only contains 0 and 1

Description

does this vector only contains 0 and 1

Usage

is.01(x)

Value

a boolean

Arguments

x

a vector

Examples

Run this code

is.01(c(0,1,0,0,1))
is.01(c(0,1,0,0,5))

Run the code above in your browser using DataLab