Learn R Programming

dataquieR (version 2.1.0)

util_string_is_not_categorical: Utility function for judging whether a character vector does not appear to be a categorical variable

Description

The function considers the following properties:

  • the maximum number of characters (to identify free text fields with long entries),

  • the relative frequency of punctuation and space characters per element (to identify, e.g., JSON or XML elements, which are structured by those characters),

  • the relative frequency of elements (categorical variables would have a low proportion of unique values in comparison to other variables).

Usage

util_string_is_not_categorical(vec)

Value

TRUE or FALSE

Arguments

vec

a character vector