rm_dup_col | R Documentation |
Remove duplicate columns. If the columns are duplicates, except one column contains NAs, then the column with NAs is removed #' test_dup <- duplicated(as.list(df)) This method detects duplicates but does not take into account NAs
rm_dup_col(df, concat_names = TRUE)
rm.dup_col(df, concat_names = TRUE)
df |
A data.frame |
concat_names |
A logical denoting how to rename the columns The default is TRUE, which renames the column by concatenating the names of all the duplicate columns FALSE will retain the first |
Other clean columns functions:
rename_col()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.