data_type: data_type Identify features of different data types.

Description Usage Arguments Value Examples

View source: R/data_type.R

Description

data_type Identify features of different data types.

Usage

1

Arguments

df

data.frame Original feature dataframe containing one column for each feature.

Value

list of data.frame ($num, $cat) Stores the categorical and numerical columns separately as two dataframes in one list. The first element in the list will contain categorical dataframe and the second will contain numerical dataframe.

Examples

1
2
3
my_data <- data.frame(fruits = c('apple', 'banana', 'pear'), counts = c(1, 2, 3), price = c(0, 1, 2))
data_type(my_data)$num
data_type(my_data)$cat

UBC-MDS/PrepR documentation built on April 2, 2020, 3:55 a.m.