R Under development (unstable) (2024-02-08 r85876 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > > > library(reclin2) Loading required package: data.table > source("helpers.R") > > > # =============================================== > # Regression test for issue #23 > # Extreme example where earlier version ended up with m-probabilities equal to 0; > # which resulted in divide by 0 -> NaN -> error. > # This has been fixed. The m-probabilties are now truncated and a warning is issued > # as this results in a wrong solution. > > ex1 <- data.frame( + a = "aaaaa", + b = "zzzzz" + ) > > ex2 <- data.frame( + a = "bbbbb", + b = "zzzzz" + ) > > pairs <- pair(ex1, ex2) > pairs <- compare_pairs(pairs, on = c("a", "b"), default_comparator = cmp_jarowinkler()) > expect_warning( + m <- problink_em(~ a + b, data = pairs) + ) > > proc.time() user system elapsed 0.40 0.15 0.53