The mapping between elements of 2 columns can have 4 different relationships: one - one, one - many, many - one, many - many. This function returns a view of the mappings by row, and prints a summary to the console.

confirm_mapping(.data, col1, col2, view = T)

Arguments

.data

a data frame

col1

column 1

col2

column 2

view

View results?

Value

A view of mappings. Also returns the view as a data frame invisibly.

Examples

iris %>% confirm_mapping(Species, Sepal.Width, view = FALSE)
#> many - many mapping between Species and Sepal.Width