Running ‘debug.R’ [2s/15s]
  Running ‘testthat.R’ [3s/16s]
Running the tests in ‘tests/debug.R’ failed.
Complete output:
  > library(pyinit)
  > X <- cbind(1, mtcars$wt, mtcars$gear)
  > y <- as.vector(mtcars$mpg)
  > n <- nrow(X)
  > p <- ncol(X)
  > delta <- 0.5 * (1 - p/n)
  > 
  > pyinit_expr <- quote(pyinit(x = X, y = y, intercept = FALSE, delta = delta, cc = 1.54764,
  +                             psc_keep = 0.5 * (1 - p/n), resid_keep_method = 'threshold',
  +                             resid_keep_thresh = 2, resid_keep_prop = 0.2, maxit = 20L,  eps = 1e-5,
  +                             mscale_maxit = 50, mscale_tol = 1e-6, mscale_rho_fun = 'bisquare'))
  > 
  > expected_obj <- c(3.169845, 3.169845, 3.433644, 5.074703, 5.074703, 0, 3.475116, 3.401738, 3.660265, 3.227703,
  +                     3.248764)
  > 
  > res1 <- eval(pyinit_expr)
  
   *** caught segfault ***
  address 0, cause 'memory not mapped'
  
  Traceback:
   1: pyinit(x = X, y = y, intercept = FALSE, delta = delta, cc = 1.54764,     psc_keep = 0.5 * (1 - p/n), resid_keep_method = "threshold",     resid_keep_thresh = 2, resid_keep_prop = 0.2, maxit = 20L,     eps = 1e-05, mscale_maxit = 50, mscale_tol = 1e-06, mscale_rho_fun = "bisquare")
   2: eval(pyinit_expr)
   3: eval(pyinit_expr)
  An irrecoverable exception occurred. R is aborting now ...
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(pyinit)
  > 
  > test_check("pyinit")
  
   *** caught segfault ***
  address 0, cause 'memory not mapped'
  
  Traceback:
   1: pyinit(x = X, y = y, intercept = FALSE, delta = delta, cc = 1.54764,     psc_keep = 0.5 * (1 - p/n), resid_keep_method = "threshold",     resid_keep_thresh = 2, resid_keep_prop = 0.2, maxit = 20L,     eps = 1e-05, mscale_maxit = 50, mscale_tol = 1e-06, mscale_rho_fun = "bisquare")
   2: eval(pyinit_expr)
   3: eval(pyinit_expr)
   4: eval(code, test_env)
   5: eval(code, test_env)
   6: 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)
   7: doTryCatch(return(expr), name, parentenv, handler)
   8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
   9: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  10: doTryCatch(return(expr), name, parentenv, handler)
  11: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: 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) {    })
  14: test_code(desc, code, env = parent.frame(), reporter = reporter)
  15: test_that("Exact fit", {    X <- cbind(1, mtcars$wt, mtcars$gear)    y <- as.vector(mtcars$mpg)    n <- nrow(X)    p <- ncol(X)    delta <- 0.5 * (1 - p/n)    pyinit_expr <- quote(pyinit(x = X, y = y, intercept = FALSE,         delta = delta, cc = 1.54764, psc_keep = 0.5 * (1 - p/n),         resid_keep_method = "threshold", resid_keep_thresh = 2,         resid_keep_prop = 0.2, maxit = 20L, eps = 1e-05, mscale_maxit = 50,         mscale_tol = 1e-06, mscale_rho_fun = "bisquare"))    expected_obj <- c(3.169845, 3.169845, 3.433644, 5.074703,         5.074703, 0, 3.475116, 3.401738, 3.660265, 3.227703,         3.248764)    res <- eval(pyinit_expr)    expect_equal(expected_obj, res$objective, tolerance = 1e-05,         info = "Objective values are different")    expect_true(all(res$objective >= 0), "Objective values are negative")    for (i in 1:100) {        res <- eval(pyinit_expr)        if (!isTRUE(all(res$objective >= 0)) && !isTRUE(all.equal(expected_obj,             res$objective, tolerance = 1e-05))) {            expect_equal(expected_obj, res$objective, tolerance = 1e-05,                 info = "Objective values are different")            expect_true(all(res$objective >= 0), "Objective values are negative")        }    }})
  16: eval(code, test_env)
  17: eval(code, test_env)
  18: 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)
  19: doTryCatch(return(expr), name, parentenv, handler)
  20: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  21: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  22: doTryCatch(return(expr), name, parentenv, handler)
  23: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  24: tryCatchList(expr, classes, parentenv, handlers)
  25: 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) {    })
  26: test_code(NULL, exprs, env)
  27: source_file(path, child_env(env), wrap = wrap)
  28: FUN(X[[i]], ...)
  29: lapply(test_paths, test_one_file, env = env, wrap = wrap)
  30: force(code)
  31: doWithOneRestart(return(expr), restart)
  32: withOneRestart(expr, restarts[[1L]])
  33: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  34: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, wrap = wrap))
  35: test_files(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,     wrap = wrap, load_package = load_package)
  36: 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,     wrap = wrap, load_package = load_package, parallel = parallel)
  37: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  38: test_check("pyinit")
  An irrecoverable exception occurred. R is aborting now ...