View source: R/detect_dupl_cols.R
detect_dupl_cols | R Documentation |
It occasionally happens that 2 (or more) columns in dataframe are exactly identical. This could lead to redundant computational cost and unexpected behavior in Machine Learning methods. This function scans though all column combinations of dataframe to examine if any 2 columns are exactly identical.
detect_dupl_cols(dataset, return_type = "col_names", duplicate_col = "right")
dataset |
A data.frame |
return_type |
How to return detected duplicate columns Use "col_names", "col_positions" or "dataset" to return dataset with deleted duplicate columns |
duplicate_col |
If 2 columns are identical, which of the 2 columns should be treated as duplicate? Use "right" for right column, "left" for left. |
A vector of duplicate column names or column positions or dataset with deleted duplicate columns. Use return_type parameter to specify.
## Not run: detect_dupl_cols(dataset = head(mutate(mtcars, mpg_2 = mpg)), duplicate_col = "right") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.