Skip to contents

This function checks if any column names in a data frame end with .x or .y, which might indicate join mistakes, and returns the names of those columns.

Usage

identify_join_suffixes(df)

Arguments

df

A data frame to check.

Value

A character vector of column names with .x or .y suffixes.

Examples

# Create a data frame with .x and .y suffixes
df <- data.frame(a.x = 1:3, b.y = 4:6, c = 7:9)
# Identify columns with .x or .y suffixes
identify_join_suffixes(df)
#> [1] "a.x" "b.y"