powered by
This helper function extracts the names of the columns in a tibble having identical values for all observations.
get_duplicated_cols(tbl)
A tibble indicating which columns which values is the same in the tibble
R object(dataframe or tibble) of the input tibble
{ library(dplyr) tbl <- mtcars %>% mutate( cyl_2 = cyl, cyl_3 = cyl, mpg_2 = mpg) get_duplicated_cols(tbl) }
Run the code above in your browser using DataLab