get_duplicated_cols {fabR} | R Documentation |
This helper function extracts the names of the columns in a tibble having identical values for all observations.
get_duplicated_cols(tbl)
tbl |
R object(dataframe or tibble) of the input tibble |
A tibble indicating which columns which values is the same in the tibble
{
library(dplyr)
mtcars_duplicated <-
mtcars %>%
mutate(
cyl_2 = cyl,
cyl_3 = cyl,
mpg_2 = mpg)
get_duplicated_cols(mtcars_duplicated)
}