isBinary: Check whether a trait is binary

Description Usage Arguments Value Author(s) Examples

Description

Check whether a trait is binary

Usage

1
isBinary(v, na_value = NULL)

Arguments

v

numeric vector.

na_value

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

Value

logical

Author(s)

Kaiyin Zhong, Fan Liu

Examples

1
2
3
4
5
6
7
8
## 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)

CollapsABEL documentation built on May 1, 2019, 7:28 p.m.