hmisc_data_type: Determine data type of a vector loosely consistent with...

View source: R/transform-hmisc.R

hmisc_data_typeR Documentation

Determine data type of a vector loosely consistent with Hmisc.

Description

Determine data type of a vector loosely consistent with Hmisc.

Usage

hmisc_data_type(x, category_threshold = NA)

Arguments

x

Vector to determine type of

category_threshold

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

Value

One of the following strings: Binomial, Categorical, or Numerical.

See Also

hmisc

Examples


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)))


tangram documentation built on Feb. 16, 2023, 5:59 p.m.