Running ‘spelling.R’
  Running ‘testthat.R’ [158s/213s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(bigsnpr)
  Loading required package: bigstatsr
  > 
  > test_check("bigsnpr", filter = "1-")
  Loading required package: foreach
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 165 | SKIPPED: 1 | WARNINGS: 0 | FAILED: 0 ]
  > test_check("bigsnpr", filter = "2-")
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 37 | SKIPPED: 3 | WARNINGS: 0 | FAILED: 0 ]
  > test_check("bigsnpr", filter = "3-")
  
   *** caught segfault ***
  address f51a4000, cause 'invalid permissions'
  
  Traceback:
   1: impute(X, rows_along(X), ind, method)
   2: FUN(ind = ind.part, ...)
   3: eval(xpr, envir = envir)
   4: eval(xpr, envir = envir)
   5: doTryCatch(return(expr), name, parentenv, handler)
   6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
   7: tryCatchList(expr, classes, parentenv, handlers)
   8: tryCatch(eval(xpr, envir = envir), error = function(e) e)
   9: doTryCatch(return(expr), name, parentenv, handler)
  10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  11: tryCatchList(expr, classes, parentenv, handlers)
  12: tryCatch({    repeat {        args <- nextElem(it)        if (obj$verbose) {            cat(sprintf("evaluation # %d:\n", i))            print(args)        }        for (a in names(args)) assign(a, args[[a]], pos = envir,             inherits = FALSE)        r <- tryCatch(eval(xpr, envir = envir), error = function(e) e)        if (obj$verbose) {            cat("result of evaluating expression:\n")            print(r)        }        tryCatch(accumulator(list(r), i), error = function(e) {            cat("error calling combine function:\n")            print(e)            NULL        })        i <- i + 1    }}, error = function(e) {    if (!identical(conditionMessage(e), "StopIteration"))         stop(simpleError(conditionMessage(e), expr))})
  13: e$fun(obj, substitute(ex), parent.frame(), e$data)
  14: foreach(ic = rows_along(intervals)) %dopar% {    ind.part <- ind[seq(intervals[ic, "lower"], intervals[ic,         "upper"])]    FUN(ind = ind.part, ...)}
  15: bigparallelr::split_parapply(p.FUN, ind, X, ..., .combine = p.combine,     ncores = ncores, opts_cluster = list(type = getOption("bigstatsr.cluster.type")))
  16: big_parallelize(Gna, function(X, ind, method) {    impute(X, rows_along(X), ind, method)}, ncores = ncores, method = method)
  17: snp_fastImputeSimple(G, "zero")
  18: eval(code, test_env)
  19: eval(code, test_env)
  20: 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)
  21: doTryCatch(return(expr), name, parentenv, handler)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  24: doTryCatch(return(expr), name, parentenv, handler)
  25: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  26: tryCatchList(expr, classes, parentenv, handlers)
  27: 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) {    })
  28: test_code(desc, code, env = parent.frame())
  29: test_that("fast imputation (simple) works", {    G <- snp_attachExtdata("example-missing.bed")$genotypes    expect_error(snp_fastImputeSimple(G, "mean"), "should be one of")    G1 <- snp_fastImputeSimple(G, "zero")    expect_equal(G[c(18, 72), 400], rep(NA_real_, 2))    expect_equal(G1[c(18, 72), 400], rep(0, 2))    G2 <- snp_fastImputeSimple(G, "mean0")    expect_equal(G[c(18, 72), 400], rep(NA_real_, 2))    expect_equal(G2[c(18, 72), 400], rep(1, 2))    G3 <- snp_fastImputeSimple(G, "mean2")    expect_equal(G3[c(18, 72), 400], rep(1.01, 2))    G4 <- snp_fastImputeSimple(G, "mode")    expect_equal(G4[c(4, 12), 1], rep(0, 2))    expect_equal(G4[c(18, 72), 400], rep(1, 2))    imp_val <- replicate(200, {        G5 <- snp_fastImputeSimple(G, "random")        G5[c(18, 72), 400]    })    abs_val <- rbinom(1e+06, size = 2, prob = mean(G[, 400],         na.rm = TRUE)/2)    expect_equal(table(imp_val)/length(imp_val), table(abs_val)/length(abs_val),         tolerance = 0.2, check.attributes = FALSE)    expect_equal(snp_fastImputeSimple(G, method = "mean2")[],         snp_fastImputeSimple(G, method = "mean2", ncores = 2)[])})
  30: eval(code, test_env)
  31: eval(code, test_env)
  32: 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)
  33: doTryCatch(return(expr), name, parentenv, handler)
  34: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  35: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  36: doTryCatch(return(expr), name, parentenv, handler)
  37: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  38: tryCatchList(expr, classes, parentenv, handlers)
  39: 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) {    })
  40: test_code(NULL, exprs, env)
  41: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  42: force(code)
  43: doWithOneRestart(return(expr), restart)
  44: withOneRestart(expr, restarts[[1L]])
  45: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  46: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,     {        reporter$start_file(basename(path))        lister$start_file(basename(path))        source_file(path, new.env(parent = env), chdir = TRUE,             wrap = wrap)        reporter$.end_context()        reporter$end_file()    })
  47: FUN(X[[i]], ...)
  48: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  49: force(code)
  50: doWithOneRestart(return(expr), restart)
  51: withOneRestart(expr, restarts[[1L]])
  52: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  53: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE, wrap = wrap))
  54: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  55: 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)
  56: 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)
  57: test_check("bigsnpr", filter = "3-")
  An irrecoverable exception occurred. R is aborting now ...