Running ‘testthat.R’ [10s/17s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library("testthat")
  > 
  > library("seriation")
  > test_check("seriation")
  
        dist
     -> testing ARSA          ... 
   *** caught segfault ***
  address 0x1, cause 'memory not mapped'
  
  Traceback:
   1: method$fun(x, control = control)
   2: system.time(order <- method$fun(x, control = control))
   3: seriate.dist(d, method = m)
   4: seriate(d, method = m)
   5: system.time(o <- seriate(d, method = m))
   6: FUN(X[[i]], ...)
   7: lapply(X = X, FUN = FUN, ...)
   8: sapply(methods, function(m) {    cat("   -> testing", format(m, width = 13), "... ")    tm <- system.time(o <- seriate(d, method = m))    cat("took", formatC(tm[3], digits = 4), "s.\n")    o})
   9: eval(code, test_env)
  10: eval(code, test_env)
  11: 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)
  12: doTryCatch(return(expr), name, parentenv, handler)
  13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  14: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  15: doTryCatch(return(expr), name, parentenv, handler)
  16: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  17: tryCatchList(expr, classes, parentenv, handlers)
  18: 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) {    })
  19: test_code(desc, code, env = parent.frame(), default_reporter = local_interactive_reporter())
  20: test_that("test if seriate.dist returns expected results", {    cat("\n      dist\n")    methods <- list_seriation_methods(kind = "dist")    methods <- setdiff(methods, "metaMDS")    os <- sapply(methods, function(m) {        cat("   -> testing", format(m, width = 13), "... ")        tm <- system.time(o <- seriate(d, method = m))        cat("took", formatC(tm[3], digits = 4), "s.\n")        o    })    expect_true(all(sapply(os, length) == nrow(x)))    hclusts <- os[sapply(os, function(x) inherits(x, "hclust"))]    expect_setequal(object = names(hclusts), expected = c("GW",         "GW_average", "GW_complete", "GW_single", "GW_ward",         "HC", "HC_average", "HC_complete", "HC_single", "HC_ward",         "OLO", "OLO_average", "OLO_complete", "OLO_single", "OLO_ward",         extra_hclust))    integers <- os[sapply(os, is.integer)]    expect_setequal(object = names(integers), expected = c("ARSA",         "Enumerate", "BBURCG", "BBWRCG", "Identity", "MDS", "MDS_angle",         "monoMDS", "isomap", "isoMDS", "Sammon_mapping", "QAP_2SUM",         "QAP_BAR", "QAP_Inertia", "QAP_LS", "R2E", "Random",         "Reverse", "GSA", "SGD", "Spectral", "Spectral_norm",         "SPIN_NH", "SPIN_STS", "TSP", "VAT", extra_integer))    expect_setequal(c(names(hclusts), names(integers)), expected = names(os))    ORDERS <- sapply(X = os, FUN = get_order, dim = 1, simplify = FALSE)    for (o in ORDERS) {        expect_type(o, "integer")        expect_mapequal(o, expected = c(a = 1, b = 2, c = 3,             d = 4))        expect_type(names(o), "character")    }    for (n in names(hclusts)) {        expect_equal(hclusts[[n]][["labels"]], expected = letters[1:4])    }    for (n in names(hclusts)) {        expect_equal(object = names(ORDERS[[n]]), expected = hclusts[[n]][["labels"]][hclusts[[n]][["order"]]])    }    deterMethods <- c("BBURCG", "BBWRCG", "GW", "GW_average",         "GW_complete", "GW_single", "GW_ward", "HC", "HC_average",         "HC_complete", "HC_single", "HC_ward", "Identity", "MDS",         "isoMDS", "Sammon_mapping", "MDS_angle", "Spectral",         "Spectral_norm", "VAT")    correct <- list(BBURCG = c(a = 1L, b = 2L, d = 4L, c = 3L),         BBWRCG = c(a = 1L, b = 2L, d = 4L, c = 3L), GW = c(a = 1L,             b = 2L, d = 4L, c = 3L), GW_average = c(a = 1L, b = 2L,             d = 4L, c = 3L), GW_complete = c(a = 1L, b = 2L,             d = 4L, c = 3L), GW_single = c(a = 1L, b = 2L, d = 4L,             c = 3L), GW_ward = c(a = 1L, b = 2L, d = 4L, c = 3L),         HC = structure(1:4, names = c("a", "b", "c", "d")), HC_average = structure(1:4,             names = c("a", "b", "c", "d")), HC_complete = structure(1:4,             names = c("a", "b", "c", "d")), HC_single = structure(1:4,             names = c("a", "b", "c", "d")), HC_ward = structure(1:4,             names = c("a", "b", "c", "d")), Identity = structure(1:4,             names = c("a", "b", "c", "d")), MDS = c(a = 1L, b = 2L,             d = 4L, c = 3L), isoMDS = c(a = 1L, b = 2L, d = 4L,             c = 3L), Sammon_mapping = c(a = 1L, b = 2L, d = 4L,             c = 3L), MDS_angle = c(a = 1L, b = 2L, d = 4L, c = 3L),         R2E = c(c = 3L, d = 4L, b = 2L, a = 1L), Spectral = c(c = 3L,             d = 4L, b = 2L, a = 1L), Spectral_norm = c(c = 3L,             d = 4L, b = 2L, a = 1L), VAT = c(c = 3L, d = 4L,             b = 2L, a = 1L))    for (m in deterMethods) expect_true(identical(correct[[m]],         get_order(os[[m]])) || identical(correct[[m]], rev(get_order(os[[m]]))),         label = paste("Seriation method", m, "does not return the correct order!\n"))})
  21: eval(code, test_env)
  22: eval(code, test_env)
  23: 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)
  24: doTryCatch(return(expr), name, parentenv, handler)
  25: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  26: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  27: doTryCatch(return(expr), name, parentenv, handler)
  28: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  29: tryCatchList(expr, classes, parentenv, handlers)
  30: 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) {    })
  31: test_code(test = NULL, code = exprs, env = env, default_reporter = StopReporter$new())
  32: source_file(path, env = env(env), desc = desc, error_call = error_call)
  33: FUN(X[[i]], ...)
  34: lapply(test_paths, test_one_file, env = env, desc = desc, error_call = error_call)
  35: doTryCatch(return(expr), name, parentenv, handler)
  36: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  37: tryCatchList(expr, classes, parentenv, handlers)
  38: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  39: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, desc = desc, error_call = error_call))
  40: 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)
  41: 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)
  42: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  43: test_check("seriation")
  An irrecoverable exception occurred. R is aborting now ...