powered by
duplicate_count_colpair() counts, for every pair of columns in a data frame, the values that occur in both. Results are ordered by that count, in descending order.
duplicate_count_colpair()
duplicate_count_colpair(data, ignore = NULL, show_rates = TRUE)
A tibble with these columns:
x, y: a pair of columns of data, one pair per row.
x
y
data
count: the number of values of x that also occur in y. Missing and ignored values are not counted.
count
total_x, total_y: the number of values in x and y that are neither missing nor ignored.
total_x
total_y
rate_x: the proportion of x values that occur in y, i.e., count / total_x, or NA if total_x is 0.
rate_x
count / total_x
NA
rate_y: the same for y. It differs from count / total_y if a value repeats within a column.
rate_y
count / total_y
Data frame or matrix with at least two columns. Blank strings, "NA", and "NaN" count as missing.
"NA"
"NaN"
Optionally, a vector of values not to count.
Logical. If TRUE (the default), add total_x, total_y, rate_x, and rate_y; see Value. FALSE is faster.
TRUE
FALSE
audit() on duplicate_count_colpair() output returns summary statistics for the numeric columns.
audit()
duplicate_count() for a frequency table.
duplicate_count()
duplicate_tally() for counts next to each value.
duplicate_tally()
janitor::get_dupes() for duplicate rows.
janitor::get_dupes()
mtcars |> duplicate_count_colpair() mtcars |> duplicate_count_colpair() |> audit()
Run the code above in your browser using DataLab