CollapsABEL (version 0.10.11)

isBinary: Check whether a trait is binary

Description

Check whether a trait is binary

Usage

isBinary(v, na_value = NULL)

Arguments

v
numeric vector.
na_value
a vector of numeric values which should be seen as NA.

Value

logical

Examples

Run this code
## Not run: 
# !isBinary(c(1, 1.1, 1, 1.1, NA))
# isBinary(c(1, 2, 1, 2, NA))
# !isBinary(c(-9, 2.3, 4.1, -9, -9), -9)
# isBinary(c(-9, 2, 4, -9, -9), -9)
# isBinary(c(1, 2, 2, 1, -9, -9.9), c(-9, -9.9))
# ## End(Not run)

Run the code above in your browser using DataLab