get_duplicated_cols {fabR}R Documentation

Extract columns that have same values in a tibble

Description

This helper function extracts the names of the columns in a tibble having identical values for all observations.

Usage

get_duplicated_cols(tbl)

Arguments

tbl

R object(dataframe or tibble) of the input tibble

Value

A tibble indicating which columns which values is the same in the tibble

Examples

{

library(dplyr)
tbl <-
  mtcars %>%
  mutate(
   cyl_2 = cyl,
   cyl_3 = cyl,
   mpg_2 = mpg)

 get_duplicated_cols(tbl)

}


[Package fabR version 2.1.0 Index]