View source: R/split_columns.r
split_columns | R Documentation |
This function splits the input data into two data.table objects: discrete and continuous. A feature is continuous if is.numeric
returns TRUE
.
split_columns(data, binary_as_factor = FALSE)
data |
input data |
binary_as_factor |
treat binary as categorical? Default is |
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.
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)
output <- split_columns(iris)
output$discrete
output$continuous
output$num_discrete
output$num_continuous
output$num_all_missing
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.