Running ‘testthat.R’ [6s/26s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(SwarmSVM)
  > 
  > test_check("SwarmSVM")
  ── 1. Error: Error Trigger (@test_alphasvm.R#15)  ──────────────────────────────
  LOGICAL() can only be applied to a 'logical', not a 'NULL'
  1: alphasvm(x = iris[, -5], y = iris[, 5]) at testthat/test_alphasvm.R:15
  2: alphasvm.default(x = iris[, -5], y = iris[, 5])
  3: assertFactor(y, len = nrow(x), max.levels = 16)
  4: checkFactor(x, levels, ordered, empty.levels.ok, any.missing, all.missing, len, min.len, 
         max.len, n.levels, min.levels, max.levels, unique, names, null.ok)
  5: .Call(c_check_factor, x, any.missing, all.missing, len, min.len, max.len, unique, 
         names, null.ok) %and% checkFactorLevels(x, levels, ordered, empty.levels.ok, 
         n.levels, min.levels, max.levels)
  6: checkFactorLevels(x, levels, ordered, empty.levels.ok, n.levels, min.levels, max.levels)
  7: qassert(empty.levels.ok, "B1")
  
  ── 2. Error: Performance (@test_alphasvm.R#24)  ────────────────────────────────
  LOGICAL() can only be applied to a 'logical', not a 'NULL'
  1: alphasvm(x = svmguide1[, -1], y = svmguide1[, 1], cost = 32) at testthat/test_alphasvm.R:24
  2: alphasvm.default(x = svmguide1[, -1], y = svmguide1[, 1], cost = 32)
  3: assertFactor(y, len = nrow(x), max.levels = 16)
  4: checkFactor(x, levels, ordered, empty.levels.ok, any.missing, all.missing, len, min.len, 
         max.len, n.levels, min.levels, max.levels, unique, names, null.ok)
  5: .Call(c_check_factor, x, any.missing, all.missing, len, min.len, max.len, unique, 
         names, null.ok) %and% checkFactorLevels(x, levels, ordered, empty.levels.ok, 
         n.levels, min.levels, max.levels)
  6: checkFactorLevels(x, levels, ordered, empty.levels.ok, n.levels, min.levels, max.levels)
  7: qassert(empty.levels.ok, "B1")
  
  
   *** caught segfault ***
  address 8, cause 'memory not mapped'
  
  Traceback:
   1: qassert(classes, "S+")
   2: checkClass(x, classes, ordered, null.ok)
   3: isTRUE(checkClass(x, classes, ordered, null.ok))
   4: testClass(x, "data.frame")
   5: clusterSVM(x = svmguide1[, -1], y = svmguide1[, 1], lambda = 0,     centers = 8, seed = 512, verbose = 0, valid.x = svmguide1.t[,         -1], valid.y = svmguide1.t[, 1])
   6: eval_bare(get_expr(quo), get_env(quo))
   7: doTryCatch(return(expr), name, parentenv, handler)
   8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
   9: tryCatchList(expr, classes, parentenv, handlers)
  10: tryCatch({    code    NULL}, error = function(e) e)
  11: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  12: quasi_capture(enquo(object), capture_error, label = label)
  13: expect_error({    csvm.obj = clusterSVM(x = svmguide1[, -1], y = svmguide1[,         1], lambda = 0, centers = 8, seed = 512, verbose = 0,         valid.x = svmguide1.t[, -1], valid.y = svmguide1.t[,             1])})
  14: eval(code, test_env)
  15: eval(code, test_env)
  16: 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)
  17: doTryCatch(return(expr), name, parentenv, handler)
  18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  20: doTryCatch(return(expr), name, parentenv, handler)
  21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  22: tryCatchList(expr, classes, parentenv, handlers)
  23: 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) {    })
  24: test_code(desc, code, env = parent.frame())
  25: test_that("Error Trigger", {    expect_error({        csvm.obj = clusterSVM(x = svmguide1[, -1], y = svmguide1[,             1], lambda = 0, centers = 8, seed = 512, verbose = 0,             valid.x = svmguide1.t[, -1], valid.y = svmguide1.t[,                 1])    })    expect_error({        csvm.obj = clusterSVM(x = svmguide1[, -1], y = svmguide1[,             1], lambda = 1, centers = 8, seed = 512, verbose = 0,             type = 11, valid.x = svmguide1.t[, -1], valid.y = svmguide1.t[,                 1])    })    expect_error({        csvm.obj = clusterSVM(x = svmguide1[, -1], y = svmguide1[,             1], lambda = 1, centers = 8, seed = 512, verbose = 0,             cost = -1, valid.x = svmguide1.t[, -1], valid.y = svmguide1.t[,                 1])    })    expect_error({        csvm.obj = clusterSVM(x = svmguide1[, -1], y = svmguide1[,             1], lambda = 1, centers = 8, seed = 512, verbose = 0,             epsilon = -1, valid.x = svmguide1.t[, -1], valid.y = svmguide1.t[,                 1])    })    expect_error({        csvm.obj = clusterSVM(x = svmguide1[, -1], y = svmguide1[,             1], lambda = 1, centers = 8, seed = 512, verbose = 0,             verbose = 10, valid.x = svmguide1.t[, -1], valid.y = svmguide1.t[,                 1])    })    csvm.obj = clusterSVM(x = svmguide1[, -1], y = svmguide1[,         1], lambda = 1, centers = 8, seed = 512, verbose = 0,         valid.x = svmguide1.t[, -1], valid.y = svmguide1.t[,             1])    expect_error({        pred = predict(csvm.obj$sparse, svmguide1.t[, -1])    })    expect_warning({        csvm.obj = clusterSVM(x = svmguide1[, -1], y = svmguide1[,             1], lambda = 1, centers = 1, seed = 512, verbose = 0,             valid.x = svmguide1.t[, -1], valid.y = svmguide1.t[,                 1])    })})
  26: eval(code, test_env)
  27: eval(code, test_env)
  28: 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)
  29: doTryCatch(return(expr), name, parentenv, handler)
  30: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  31: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  32: doTryCatch(return(expr), name, parentenv, handler)
  33: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  34: tryCatchList(expr, classes, parentenv, handlers)
  35: 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) {    })
  36: test_code(NULL, exprs, env)
  37: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  38: force(code)
  39: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,     {        lister$start_file(basename(path))        source_file(path, new.env(parent = env), chdir = TRUE,             wrap = wrap)        end_context()    })
  40: FUN(X[[i]], ...)
  41: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  42: force(code)
  43: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE, wrap = wrap))
  44: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  45: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     wrap = wrap)
  46: test_package_dir(package = package, test_path = test_path, filter = filter,     reporter = reporter, ..., stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  47: test_check("SwarmSVM")
  An irrecoverable exception occurred. R is aborting now ...