determineVarType: Uses some basic heuristics to classify type of variable

Description Usage Arguments Value

Description

This function uses some basic heuristics to guess the basic variable type. The options are "Empty", "Constant", "Logical", "Date" "Categorical" "Continous" or "Undeclared". It guesses using these rules, in order:

- If all values are NA or all are "" (up to 5 spaces) then it is "Empty" - If there is only one value, not including NAs, it it "Constant" - If class is Logical or levels contain only (case insensitive) TRUE/FALSE/ T/F, YES/NO, Y/N, or 0/1 then it is "Logical" - If class is Date then it is "Date" - If class is factor or unique values is less 20 then it is "Categorical" - if variable come contains case insensitive "id" then it is "Identifier" - If class is integer or numeric it is "Continous" - If class is Character then it is "Character" - Otherwise it is "Unclassified"

Usage

1
determineVarType(varname, df)

Arguments

varname

Variable to which type is to be determined.

df

Dataset in which variable resides

Value

A variable type of "ID", "Likely ID",


MartinLBarron/CodebookGenerator documentation built on May 25, 2019, 12:23 p.m.