powered by
This function splits the input data into two data.table objects: discrete and continuous. A feature is continuous if is.numeric returns TRUE.
is.numeric
TRUE
split_columns(data, binary_as_factor = FALSE)
discrete all discrete features
discrete
continous all continuous features
continous
num_discrete number of discrete features
num_discrete
num_continuous number of continuous features
num_continuous
num_all_missing number of features with no observations (all values are missing)
num_all_missing
input data
treat binary as categorical? Default is FALSE.
FALSE
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.
output <- split_columns(iris) output$discrete output$continuous output$num_discrete output$num_continuous output$num_all_missing
Run the code above in your browser using DataLab