get_duplicated_cols: Extract columns that have same values in a tibble

View source: R/04-check_table_values.R

get_duplicated_colsR 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)

}


fabR documentation built on May 29, 2024, 2:58 a.m.