is.categorical {tangram} | R Documentation |
Determine if a vector is categorical or not
Description
Determine if a vector is categorical or not
Usage
is.categorical(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.categorical(c(1,2,3))
is.categorical(c(rep(1,20), rep(2, 20), rep(3, 20)), threshold=5)
is.categorical(c("A","B","B"))
is.categorical(factor(c("A","B","C")))
is.categorical(factor(c("A","B","B","A")))
is.categorical(factor(c(TRUE, FALSE, TRUE, FALSE)))
[Package tangram version 0.8.2 Index]