split_columns: Split data into discrete and continuous parts

Description Usage Arguments Details Value Examples

View source: R/split_columns.r

Description

This function splits the input data into two data.table objects: discrete and continuous. A feature is continuous if is.numeric returns TRUE.

Usage

1
split_columns(data, binary_as_factor = FALSE)

Arguments

data

input data

binary_as_factor

treat binary as categorical? Default is FALSE.

Details

Features with all missing values will be dropped from the output data, but will be counted towards the column count.

The elements in the output list will have the same class as the input data.

Value

discrete all discrete features

continous all continuous features

num_discrete number of discrete features

num_continuous number of continuous features

num_all_missing number of features with no observations (all values are missing)

Examples

1
2
3
4
5
6
output <- split_columns(iris)
output$discrete
output$continuous
output$num_discrete
output$num_continuous
output$num_all_missing

boxuancui/eda documentation built on Dec. 9, 2020, 11:11 p.m.