| Check_Dupe_Columns {Colossus} | R Documentation |
checks for duplicated column names
Description
Check_Dupe_Columns checks for duplicated columns, columns with the same values, and columns with 1 value. Currently not updated for multi-terms
Usage
Check_Dupe_Columns(df, cols, term_n, verbose = FALSE, factor_check = FALSE)
Arguments
df |
a data.table containing the columns of interest |
cols |
columns to check |
term_n |
term numbers |
verbose |
boolean to control if additional information is printed to the console, also accepts 0/1 integer |
factor_check |
a boolean used to skip comparing columns of the form ?_? with the same initial string, which is used for factored columns |
Value
returns the usable columns
See Also
Other Data Cleaning Functions:
Check_Trunc(),
Correct_Formula_Order(),
Date_Shift(),
Def_Control(),
Def_Control_Guess(),
Def_model_control(),
Def_modelform_fix(),
Joint_Multiple_Events(),
Replace_Missing(),
Time_Since(),
factorize(),
factorize_par(),
gen_time_dep(),
interact_them()
Examples
library(data.table)
a <- c(0,1,2,3,4,5,6)
b <- c(1,2,3,4,5,6,7)
c <- c(0,1,2,1,0,1,0)
df <- data.table::data.table("a"=a,"b"=b,"c"=c)
cols <- c("a","b","c")
term_n <- c(0,0,1)
unique_cols <- Check_Dupe_Columns(df, cols, term_n)
[Package Colossus version 1.1.1 Index]