Running ‘testthat.R’ [86s/112s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(cutpointr)
  > 
  > test_check("cutpointr")
  
   *** caught segfault ***
  address 0x1, cause 'memory not mapped'
  
  Traceback:
   1: stats::smooth.spline(x = roccurve$x.sorted[finite_roc], y = roccurve$m[finite_roc],     w = args[["w"]], spar = args[["spar"]], cv = FALSE, nknots = nknots,     df.offset = args[["df_offset"]], penalty = args[["penalty"]],     control.spar = args[["control_spar"]], tol = 1e-100)
   2: optimize_metric(data = data, x = x, class = class, metric_func = metric_func,     pos_class = pos_class, neg_class = neg_class, minmax = "max",     direction = direction, metric_name = metric_name, w = w,     df = df, spar = spar, nknots = nknots, df_offset = df_offset,     penalty = penalty, control_spar = control_spar, spline = TRUE,     tol_metric = tol_metric, use_midpoints = use_midpoints, ...)
   3: method(data = dat$data[[1]], x = predictor, class = outcome,     metric_func = metric, direction = direction, pos_class = pos_class,     neg_class = neg_class, tol_metric = tol_metric, boot_stratify = boot_stratify,     use_midpoints = use_midpoints, ...)
   4: cutpointr_internal(x, class, subgroup, method, metric, pos_class,     neg_class, direction, boot_runs, boot_stratify, use_midpoints,     break_ties, na.rm, allowParallel, predictor, outcome, mod_name,     subgroup_var, tol_metric, ...)
   5: cutpointr.default(suicide, dsi, suicide, method = maximize_spline_metric,     nknots = 5, spar = 0.3)
   6: cutpointr(suicide, dsi, suicide, method = maximize_spline_metric,     nknots = 5, spar = 0.3)
   7: eval(code, test_env)
   8: eval(code, test_env)
   9: 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)
  10: doTryCatch(return(expr), name, parentenv, handler)
  11: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  12: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  13: doTryCatch(return(expr), name, parentenv, handler)
  14: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  15: tryCatchList(expr, classes, parentenv, handlers)
  16: 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) {    })
  17: test_code(desc, code, env = parent.frame(), default_reporter = local_interactive_reporter())
  18: test_that("smoothing splines lead to plausible results", {    cp <- cutpointr(suicide, dsi, suicide, method = maximize_spline_metric,         nknots = 5, spar = 0.3)    expect_equal(cp$optimal_cutpoint, 3)    test_plot.cutpointr(cp)    test_ggplot_functions(cp)    expect_silent(summary(cp))    cp <- cutpointr(suicide, dsi, suicide, gender, method = maximize_spline_metric,         nknots = 5, spar = 0.3)    expect_equal(cp$optimal_cutpoint, c(3, 3))    test_plot.cutpointr(cp)    test_ggplot_functions(cp)    expect_silent(summary(cp))    cp <- cutpointr(suicide, dsi, suicide, method = minimize_spline_metric,         nknots = 5, spar = 0.3, df = 5, metric = abs_d_sens_spec)    expect_equal(cp$optimal_cutpoint, 3)    test_plot.cutpointr(cp)    test_ggplot_functions(cp)    expect_silent(summary(cp))})
  19: eval(code, test_env)
  20: eval(code, test_env)
  21: 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)
  22: doTryCatch(return(expr), name, parentenv, handler)
  23: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  24: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  25: doTryCatch(return(expr), name, parentenv, handler)
  26: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  27: tryCatchList(expr, classes, parentenv, handlers)
  28: 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) {    })
  29: test_code(test = NULL, code = exprs, env = env, default_reporter = StopReporter$new())
  30: source_file(path, env = env(env), desc = desc, error_call = error_call)
  31: FUN(X[[i]], ...)
  32: lapply(test_paths, test_one_file, env = env, desc = desc, error_call = error_call)
  33: doTryCatch(return(expr), name, parentenv, handler)
  34: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  35: tryCatchList(expr, classes, parentenv, handlers)
  36: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  37: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, desc = desc, error_call = error_call))
  38: 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)
  39: 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)
  40: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  41: test_check("cutpointr")
  An irrecoverable exception occurred. R is aborting now ...