View source: R/compile-typing.R
is.categorical | R Documentation |
Determine if a vector is categorical or not
is.categorical(x, threshold = NA)
x |
Vector to determine type of |
threshold |
The upper threshold of unique values for which a vector is considered categorical. |
A Boolean: TRUE / FALSE
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)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.