Get N and percent match of values between two columns of two data.tables
Source:R/utils_data.table.R
dt_pctmatch.RdGet N and percent match of values between two columns of two data.tables
Examples
library(data.table)
x <- data.table(ID = 1:5, Alpha = letters[1:5])
y <- data.table(ID = c(3, 4, 5, 6), Beta = LETTERS[3:6])
dt_pctmatch(x, y, on = "ID")
#> 2026-02-22 18:59:25
#> Matched 3/5 on ID (60.00%)
#> [dt_pctmatch]