Running ‘testthat.R’ [1s/2s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(fedmatch)
  > 
  > test_check("fedmatch")
  
   *** caught segfault ***
  address 0x1, cause 'memory not mapped'
  
  Traceback:
   1: (function (x, table, nomatch = NA_integer_, matchNA = TRUE, method = c("osa",     "lv", "dl", "hamming", "lcs", "qgram", "cosine", "jaccard",     "jw", "soundex"), useBytes = FALSE, weight = c(d = 1, i = 1,     s = 1, t = 1), maxDist = 0.1, q = 1, p = 0, bt = 0, nthread = getOption("sd_num_thread")) {    x <- as.character(x)    table <- as.character(table)    if (!useBytes) {        x <- enc2utf8(x)        table <- enc2utf8(table)    }    method <- match.arg(method)    stopifnot(all(is.finite(weight)), all(weight > 0), all(weight <=         1), q >= 0, p <= 0.25, p >= 0, matchNA %in% c(TRUE, FALSE),         maxDist > 0, is.logical(useBytes), ifelse(method %in%             c("osa", "dl"), length(weight) >= 4, TRUE), ifelse(method %in%             c("lv", "jw"), length(weight) >= 3, TRUE), nthread >             0)    if (method == "jw")         weight <- weight[c(2, 1, 3)]    method <- METHODS[method]    if (is.na(method)) {        stop(sprintf("method '%s' is not defined", method))    }    .Call("R_amatch", x, table, method, as.integer(nomatch),         as.integer(matchNA), as.double(weight), as.double(p),         as.double(bt), as.integer(q), as.double(maxDist), as.integer(useBytes),         as.integer(nthread), PACKAGE = "stringdist")})(c("Walmart", "Bershire Hataway", "Apple", "Exxon Mobile", "McKesson ", "UnitedHealth Group", "CVS Health", "General Motors", "AT&T", "Ford Motor Company"), c("Walmart", "Bershire Hathaway", "Apple Computer", "Exxon Mobile Inc. ", "McKesson Corp.", "UnitedHealth Group", "CVS", "GM", "AT & T", "Ford Motor"), method = "jw", p = 0.1,     maxDist = 0.05, matchNA = FALSE, nthread = NULL)
   2: do.call(stringdist::amatch, c(list(data1[[by.x]], data2[[by.y]]),     fuzzy_settings))
   3: fuzzy_match(data1, data2, by.x = by.x, by.y = by.y, suffixes = suffixes,     unique_key_1 = unique_key_1, unique_key_2 = unique_key_2,     fuzzy_settings = fuzzy_settings)
   4: merge_plus(match_type = "fuzzy", data1 = corp_data1_test, data2 = corp_data2_test,     by.x = "Company", by.y = "Name", unique_key_1 = "id_1", unique_key_2 = "id_2",     suffixes = c("_1", "_2"), score_settings = build_score_settings(score_var_x = c("Company",         "Country"), score_var_y = c("Name", "country"), wgts = c(0.5,         0.5), score_type = c("stringdist", "indicator")), filter = 0.995)
   5: eval(code, test_env)
   6: eval(code, test_env)
   7: withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error)
   8: doTryCatch(return(expr), name, parentenv, handler)
   9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  10: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  11: doTryCatch(return(expr), name, parentenv, handler)
  12: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  13: tryCatchList(expr, classes, parentenv, handlers)
  14: tryCatch(withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error), error = handle_fatal,     skip = function(e) {    })
  15: test_code(desc, code, env = parent.frame(), reporter = reporter)
  16: test_that("scoring works at all", {    corp_data1_test <- copy(fedmatch::corp_data1)    corp_data2_test <- copy(fedmatch::corp_data2)    corp_data1_test[, `:=`(id_1, seq(1, .N))]    corp_data2_test[, `:=`(id_2, seq(1, .N))]    result <- merge_plus(match_type = "fuzzy", data1 = corp_data1_test,         data2 = corp_data2_test, by.x = "Company", by.y = "Name",         unique_key_1 = "id_1", unique_key_2 = "id_2", suffixes = c("_1",             "_2"), score_settings = build_score_settings(score_var_x = c("Company",             "Country"), score_var_y = c("Name", "country"), wgts = c(0.5,             0.5), score_type = c("stringdist", "indicator")),         filter = 0.995)    result    expect_is(result$matches, "data.table")})
  17: eval(code, test_env)
  18: eval(code, test_env)
  19: withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error)
  20: doTryCatch(return(expr), name, parentenv, handler)
  21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  22: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  23: doTryCatch(return(expr), name, parentenv, handler)
  24: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  25: tryCatchList(expr, classes, parentenv, handlers)
  26: tryCatch(withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error), error = handle_fatal,     skip = function(e) {    })
  27: test_code(test = NULL, code = exprs, env = env, reporter = get_reporter() %||%     StopReporter$new())
  28: source_file(path, env = env(env), desc = desc, error_call = error_call)
  29: FUN(X[[i]], ...)
  30: lapply(test_paths, test_one_file, env = env, desc = desc, error_call = error_call)
  31: doTryCatch(return(expr), name, parentenv, handler)
  32: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  33: tryCatchList(expr, classes, parentenv, handlers)
  34: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  35: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, desc = desc, error_call = error_call))
  36: test_files_serial(test_dir = test_dir, test_package = test_package,     test_paths = test_paths, load_helpers = load_helpers, reporter = reporter,     env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     desc = desc, load_package = load_package, error_call = error_call)
  37: test_files(test_dir = path, test_paths = test_paths, test_package = package,     reporter = reporter, load_helpers = load_helpers, env = env,     stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     load_package = load_package, parallel = parallel)
  38: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  39: test_check("fedmatch")
  An irrecoverable exception occurred. R is aborting now ...
  Segmentation fault