Description Usage Arguments Value Examples
View source: R/utility_functions.R
If a lot of columns have the same value in a large dataframe with unique rows, it becomes challenging to figure out which column/columns are responsible for causing this duplication. This function tries to simplify this analysis by figuring out these columns which are wreaking havoc.
1 | cols_mult_vals(DT, key_cols)
|
DT |
A data.table or a data.frame. A data.frame will be converted to a data.table. |
key_cols |
A character vector containing key column names. |
A character vector with column names which are causing duplicates.
1 2 3 | cols_mult_vals(DT = data.table::data.table(col_key = c("a", "b", "a"),
col_1 = c(3 , 5, 3), col_2 = c("v1", "v2", "v3")),
key_cols = c("col_key"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.