powered by
Determine data type of a vector loosely consistent with Hmisc.
hmisc_data_type(x, category_threshold = NA)
One of the following strings: Binomial, Categorical, or Numerical.
Vector to determine type of
The upper threshold of unique values for which a vector is considered categorical.
hmisc
hmisc_data_type(c(1,2,3)) hmisc_data_type(factor(c("A","B","C"))) hmisc_data_type(factor(c("A","B","B","A"))) hmisc_data_type(factor(c(TRUE, FALSE, TRUE, FALSE)))
Run the code above in your browser using DataLab