Detect: Detect variable type in a data matrix

Description Usage Arguments Value Examples

View source: R/funs.R

Description

This function detects the type of the variables in a data matrix. Types can be continuous only, categorical only or mixed type. The rule for defining a variable as a categorical variable is when: (1) it is a character vector, (2) it contains no more than n = 5 unique values

Usage

1
Detect(x, n = 5)

Arguments

x

is the data matrix that need to be detected.

n

is a number, indicating how many levels, if outnumbered, can be seen as an numeric variable, rather than a categorical variable.

Value

the variable type for every column, can either be "numeric" or "character".

Examples

1
2
3
4
5
6

imputeR documentation built on Jan. 21, 2020, 1:06 a.m.