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)
mtcars_duplicated <-
 mtcars %>%
 mutate(
  cyl_2 = cyl,
  cyl_3 = cyl,
  mpg_2 = mpg)

 get_duplicated_cols(mtcars_duplicated)

}


[Package fabR version 1.1.1 Index]