get_unique_value_cols: Extract columns that have unique values in a tibble

get_unique_value_colsR Documentation

Extract columns that have unique values in a tibble

Description

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

Usage

get_unique_value_cols(tbl)

Arguments

tbl

R object(dataframe or tibble) of the input tibble

Value

A vector string indicating either that the tibble does not have empty columns or the names of the empty columns.

Examples

{

##### Example 1 -------------------------------------------------------------
# All columns have distinct observation
get_unique_value_cols(iris)

##### Example 2 -------------------------------------------------------------
# One column doesn't have distinct observations
get_unique_value_cols(tbl = iris[1:50,])

}


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