find_duplicate_cols {fixr}R Documentation

Find Duplicate Columns

Description

This function takes a data frame as input and checks for duplicate columns. A column is considered a duplicate of another column if all values in both columns are the same. If any duplicate columns are found, the function prints a message indicating which columns are duplicates of which other columns. If no duplicate columns are found, the function prints a message indicating that no duplicates were found.

Usage

find_duplicate_cols(df)

Arguments

df

A data frame

Value

A message indicating which columns are duplicates of which other columns

Examples

df <- data.frame(w = c(7, 8, 180, 7), x = c("a", "b", "c", "a"),
                 y = c(4, NA, -6, 4), z = c(7, 8, 180, 7))
find_duplicate_cols(df)
# Column 'c' is a duplicate of column 'a'

[Package fixr version 0.1.0 Index]