is.binomial: Determine if a vector is binomial or not

View source: R/compile-typing.R

is.binomialR Documentation

Determine if a vector is binomial or not

Description

Determine if a vector is binomial or not

Usage

is.binomial(x, threshold = NA)

Arguments

x

Vector to determine type of

threshold

The upper threshold of unique values for which a vector is considered categorical.

Value

a Boolean: TRUE / FALSE

Examples


is.binomial(c(1,2,3))
is.binomial(factor(c("A","B","C")))
is.binomial(factor(c("A","B","B","A")))
is.binomial(factor(c(TRUE, FALSE, TRUE, FALSE)))
is.binomial(c('M', 'F', 'M', 'F'), 10)

spgarbet/tg documentation built on Feb. 21, 2023, 3:35 a.m.