Running ‘testthat.R’ [0s/0s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(LDcorSV)
  > 
  > test_check("LDcorSV")
  
   *** caught segfault ***
  address 0x110, cause 'invalid permissions'
  
   *** caught segfault ***
  address 0x110, cause 'invalid permissions'
  
  Traceback:
   1: Inv.proj.matrix.sdp(V)
   2: Measure.R2V(biloci = lij, V = V, na.presence = na.presence)
   3: FUN(X[[i]], ...)
   4: lapply(X = X, FUN = FUN, ...)
   5: sapply((i + 1):(ncol(donnees)), function(j) {    li <- donnees[, i]    lj <- donnees[, j]    lij <- cbind(li, lj)    loc1 <- c(loc1, mark[i])    loc2 <- c(loc2, mark[j])    M.r2 <- Measure.R2(biloci = lij, na.presence = na.presence)    if (!S.yes)         M.r2s <- Measure.R2S(biloci = lij, struc = S, na.presence = na.presence)    if (!V.yes) {        if (!na.presence)             M.r2v <- Measure.R2V(biloci = lij, V = V, na.presence = na.presence,                 V_inv = V_inv)        else M.r2v <- Measure.R2V(biloci = lij, V = V, na.presence = na.presence)    }    if (!S.yes & !V.yes) {        if (!na.presence)             M.r2vs <- Measure.R2VS(biloci = lij, V = V, struc = S,                 na.presence = na.presence, V_inv = V_inv)        else M.r2vs <- Measure.R2VS(biloci = lij, V = V, struc = S,             na.presence = na.presence)    }    r2 <- c(r2, M.r2)    r2s <- c(r2s, M.r2s)    r2v <- c(r2v, M.r2v)    r2vs <- c(r2vs, M.r2vs)    if (supinfo) {        M.MAF.loc1 <- NA        M.heterofreq.loc1 <- NA        M.NAfreq.loc1 <- NA        M.MAF.loc2 <- NA        M.heterofreq.loc2 <- NA        M.NAfreq.loc2 <- NA        supinfo.li <- info[, which(colnames(info) == mark[i])]        supinfo.lj <- info[, which(colnames(info) == mark[j])]        M.MAF.loc1 <- supinfo.li[1]        M.heterofreq.loc1 <- supinfo.li[2]        M.NAfreq.loc1 <- supinfo.li[3]        M.MAF.loc2 <- supinfo.lj[1]        M.heterofreq.loc2 <- supinfo.lj[2]        M.NAfreq.loc2 <- supinfo.lj[3]        MAF.loc1 <- c(MAF.loc1, M.MAF.loc1)        heterofreq.loc1 <- c(heterofreq.loc1, M.heterofreq.loc1)        NAfreq.loc1 <- c(NAfreq.loc1, M.NAfreq.loc1)        MAF.loc2 <- c(MAF.loc2, M.MAF.loc2)        heterofreq.loc2 <- c(heterofreq.loc2, M.heterofreq.loc2)        NAfreq.loc2 <- c(NAfreq.loc2, M.NAfreq.loc2)    }    res <- c(as.matrix(loc1), as.matrix(loc2), r2, r2s, r2v,         r2vs, MAF.loc1, heterofreq.loc1, NAfreq.loc1, MAF.loc2,         heterofreq.loc2, NAfreq.loc2)})
   6: FUN(X[[i]], ...)
   7: lapply(X = S, FUN = FUN, ...)
   8: doTryCatch(return(expr), name, parentenv, handler)
   9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  10: tryCatchList(expr, classes, parentenv, handlers)
  
  Traceback:
   1: Inv.proj.matrix.sdp(V)
   2: Measure.R2V(biloci = lij, V = V, na.presence = na.presence)
   3: FUN(X[[i]], ...)
   4: lapply(X = X, FUN = FUN, ...)
   5: sapply((i + 1):(ncol(donnees)), function(j) {    li <- donnees[, i]11: tryCatch(expr, error = function(e) {    call <- conditionCall(e)    if (!is.null(call)) {        if (identical(call[[1L]], quote(doTryCatch)))             call <- sys.call(-4L)        dcall <- deparse(call, nlines = 1L)        prefix <- paste("Error in", dcall, ": ")        LONG <- 75L        sm <- strsplit(conditionMessage(e), "\n")[[1L]]        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")        if (is.na(w))             w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],                 type = "b")        if (w > LONG)     lj <- donnees[, j]    lij <- cbind(li, lj)    loc1 <- c(loc1, mark[i])    loc2 <- c(loc2, mark[j])    M.r2 <- Measure.R2(biloci = lij, na.presence = na.presence)    if (!S.yes)         M.r2s <- Measure.R2S(biloci = lij, struc = S, na.presence = na.presence)    if (!V.yes) {        if (!na.presence)             M.r2v <- Measure.R2V(biloci = lij, V = V, na.presence = na.presence,                 V_inv = V_inv)        else M.r2v <- Measure.R2V(biloci = lij, V = V, na.presence = na.presence)    }    if (!S.yes & !V.yes) {        if (!na.presence)             M.r2vs <- Measure.R2VS(biloci = lij, V = V, struc = S,             prefix <- paste0(prefix, "\n  ")    }    else prefix <- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && isTRUE(getOption("show.error.messages"))) {        cat(msg, file = outFile)        .Internal(printDeferredWarnings())    }                na.presence = na.presence, V_inv = V_inv)        else M.r2vs <- Measure.R2VS(biloci = lij, V = V, struc = S,             na.presence = na.presence)    }    r2 <- c(r2, M.r2)    r2s <- c(r2s, M.r2s)    r2v <- c(r2v, M.r2v)    r2vs <- c(r2vs, M.r2vs)    if (supinfo) {        M.MAF.loc1 <- NA        M.heterofreq.loc1 <- NA        M.NAfreq.loc1 <- NA        M.MAF.loc2 <- NA        M.heterofreq.loc2 <- NA        M.NAfreq.loc2 <- NA    invisible(structure(msg, class = "try-error", condition = e))})
  12: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
  13: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
  14: FUN(X[[i]], ...)
  15: lapply(seq_len(cores), inner.do)
  16: mclapply(1:(ncol(donnees) - 1), function(i) {    res <- sapply((i + 1):(ncol(donnees)), function(j) {        li <- donnees[, i]        lj <- donnees[, j]        lij <- cbind(li, lj)        loc1 <- c(loc1, mark[i])        loc2 <- c(loc2, mark[j])        M.r2 <- Measure.R2(biloci = lij, na.presence = na.presence)        if (!S.yes)         supinfo.li <- info[, which(colnames(info) == mark[i])]        supinfo.lj <- info[, which(colnames(info) == mark[j])]        M.MAF.loc1 <- supinfo.li[1]        M.heterofreq.loc1 <- supinfo.li[2]        M.NAfreq.loc1 <- supinfo.li[3]        M.MAF.loc2 <- supinfo.lj[1]        M.heterofreq.loc2 <- supinfo.lj[2]        M.NAfreq.loc2 <- supinfo.lj[3]        MAF.loc1 <- c(MAF.loc1, M.MAF.loc1)        heterofreq.loc1 <- c(heterofreq.loc1, M.heterofreq.loc1)        NAfreq.loc1 <- c(NAfreq.loc1, M.NAfreq.loc1)        MAF.loc2 <- c(MAF.loc2, M.MAF.loc2)        heterofreq.loc2 <- c(heterofreq.loc2, M.heterofreq.loc2)        NAfreq.loc2 <- c(NAfreq.loc2, M.NAfreq.loc2)    }    res <- c(as.matrix(loc1), as.matrix(loc2), r2, r2s, r2v,         r2vs, MAF.loc1, heterofreq.loc1, NAfreq.loc1, MAF.loc2,         heterofreq.loc2, NAfreq.loc2)})
              M.r2s <- Measure.R2S(biloci = lij, struc = S, na.presence = na.presence)        if (!V.yes) {            if (!na.presence)                 M.r2v <- Measure.R2V(biloci = lij, V = V, na.presence = na.presence,                   V_inv = V_inv)            else M.r2v <- Measure.R2V(biloci = lij, V = V, na.presence = na.presence)        }        if (!S.yes & !V.yes) {            if (!na.presence)                 M.r2vs <- Measure.R2VS(biloci = lij, V = V, struc = S,                   na.presence = na.presence, V_inv = V_inv)            else M.r2vs <- Measure.R2VS(biloci = lij, V = V,                 struc = S, na.presence = na.presence)        }        r2 <- c(r2, M.r2)        r2s <- c(r2s, M.r2s)        r2v <- c(r2v, M.r2v)        r2vs <- c(r2vs, M.r2vs)        if (supinfo) {            M.MAF.loc1 <- NA            M.heterofreq.loc1 <- NA            M.NAfreq.loc1 <- NA            M.MAF.loc2 <- NA            M.heterofreq.loc2 <- NA            M.NAfreq.loc2 <- NA            supinfo.li <- info[, which(colnames(info) == mark[i])] 6: FUN(X[[i]], ...)
   7: lapply(X = S, FUN = FUN, ...)
   8: doTryCatch(return(expr), name, parentenv, handler)
   9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
              supinfo.lj <- info[, which(colnames(info) == mark[j])]            M.MAF.loc1 <- supinfo.li[1]            M.heterofreq.loc1 <- supinfo.li[2]            M.NAfreq.loc1 <- supinfo.li[3]            M.MAF.loc2 <- supinfo.lj[1]10: tryCatchList(expr, classes, parentenv, handlers)
  11: tryCatch(expr, error = function(e) {    call <- conditionCall(e)    if (!is.null(call)) {        if (identical(call[[1L]], quote(doTryCatch)))             call <- sys.call(-4L)        dcall <- deparse(call, nlines = 1L)            M.heterofreq.loc2 <- supinfo.lj[2]            M.NAfreq.loc2 <- supinfo.lj[3]            MAF.loc1 <- c(MAF.loc1, M.MAF.loc1)            heterofreq.loc1 <- c(heterofreq.loc1, M.heterofreq.loc1)            NAfreq.loc1 <- c(NAfreq.loc1, M.NAfreq.loc1)            MAF.loc2 <- c(MAF.loc2, M.MAF.loc2)            heterofreq.loc2 <- c(heterofreq.loc2, M.heterofreq.loc2)            NAfreq.loc2 <- c(NAfreq.loc2, M.NAfreq.loc2)        }        res <- c(as.matrix(loc1), as.matrix(loc2), r2, r2s, r2v,             r2vs, MAF.loc1, heterofreq.loc1, NAfreq.loc1, MAF.loc2,         prefix <- paste("Error in", dcall, ": ")        LONG <- 75L        sm <- strsplit(conditionMessage(e), "\n")[[1L]]        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")        if (is.na(w))             w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],                 type = "b")        if (w > LONG)             prefix <- paste0(prefix, "\n  ")    }    else prefix <- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && isTRUE(getOption("show.error.messages"))) {        cat(msg, file = outFile)        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})
  12: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)            heterofreq.loc2, NAfreq.loc2)    })    RES <- cbind(RES, res)})
  17: LD.Measures(Geno, V = V.WAIS, S = S.2POP, data = "G", supinfo = TRUE,     na.presence = TRUE)
  18: eval(code, test_env)
  19: eval(code, test_env)
  20: withCallingHandlers({    eval(code, test_env)
  13: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
  14: FUN(X[[i]], ...)
  15: lapply(seq_len(cores), inner.do)
  16:     new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, mclapply(1:(ncol(donnees) - 1), function(i) {    res <- sapply((i + 1):(ncol(donnees)), function(j) {        li <- donnees[, i]        lj <- donnees[, j]        lij <- cbind(li, lj)        loc1 <- c(loc1, mark[i])        loc2 <- c(loc2, mark[j])        M.r2 <- Measure.R2(biloci = lij, na.presence = na.presence)        if (!S.yes)     error = handle_error, interrupt = handle_interrupt)
  21: doTryCatch(return(expr), name, parentenv, handler)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: tryCatchList(expr, classes, parentenv, handlers)
  24: tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {            M.r2s <- Measure.R2S(biloci = lij, struc = S, na.presence = na.presence)        if (!V.yes) {            if (!na.presence)                 M.r2v <- Measure.R2V(biloci = lij, V = V, na.presence = na.presence,                   V_inv = V_inv)            else M.r2v <- Measure.R2V(biloci = lij, V = V, na.presence = na.presence)        }        if (!S.yes & !V.yes) {            if (!na.presence)                 M.r2vs <- Measure.R2VS(biloci = lij, V = V, struc = S,                   na.presence = na.presence, V_inv = V_inv)            else M.r2vs <- Measure.R2VS(biloci = lij, V = V,                 struc = S, na.presence = na.presence)        }        r2 <- c(r2, M.r2)        r2s <- c(r2s, M.r2s)        r2v <- c(r2v, M.r2v)    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
  25: doWithOneRestart(return(expr), restart)
  26: withOneRestart(expr, restarts[[1L]])
  27: withRestarts(tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {        r2vs <- c(r2vs, M.r2vs)        if (supinfo) {            M.MAF.loc1 <- NA            M.heterofreq.loc1 <- NA            M.NAfreq.loc1 <- NA            M.MAF.loc2 <- NA            M.heterofreq.loc2 <- NA            M.NAfreq.loc2 <- NA            supinfo.li <- info[, which(colnames(info) == mark[i])]            supinfo.lj <- info[, which(colnames(info) == mark[j])]            M.MAF.loc1 <- supinfo.li[1]            M.heterofreq.loc1 <- supinfo.li[2]            M.NAfreq.loc1 <- supinfo.li[3]            M.MAF.loc2 <- supinfo.lj[1]            M.heterofreq.loc2 <- supinfo.lj[2]    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal),     end_test = function() {    })
  28: test_code(code, parent.frame())
  29: test_that("LD measures", {    data(data.test)    Geno <- data.test[[1]]    V.WAIS <- data.test[[2]]    S.2POP <- data.test[[3]]    LD <- LD.Measures(Geno, V = V.WAIS, S = S.2POP, data = "G",         supinfo = TRUE, na.presence = TRUE)    expect_equal(LD[173, 3], 0.00736549685246069, tolerance = 1e-06)    expect_equal(LD[173, 4], 0.0096994662565902, tolerance = 1e-06)    expect_equal(LD[173, 5], 0.0115996465046284, tolerance = 1e-06)    expect_equal(LD[173, 6], 0.0103672763202665, tolerance = 1e-06)    expect_equal(LD[173, 7], 0.021978021978022, tolerance = 1e-06)    expect_equal(LD[173, 8], 0.043956043956044, tolerance = 1e-06)    expect_equal(LD[173, 9], 0, tolerance = 1e-06)    expect_equal(LD[173, 10], 0.0934065934065934, tolerance = 1e-06)            M.NAfreq.loc2 <- supinfo.lj[3]            MAF.loc1 <- c(MAF.loc1, M.MAF.loc1)            heterofreq.loc1 <- c(heterofreq.loc1, M.heterofreq.loc1)            NAfreq.loc1 <- c(NAfreq.loc1, M.NAfreq.loc1)            MAF.loc2 <- c(MAF.loc2, M.MAF.loc2)            heterofreq.loc2 <- c(heterofreq.loc2, M.heterofreq.loc2)            NAfreq.loc2 <- c(NAfreq.loc2, M.NAfreq.loc2)        }        res <- c(as.matrix(loc1), as.matrix(loc2), r2, r2s, r2v,             r2vs, MAF.loc1, heterofreq.loc1, NAfreq.loc1, MAF.loc2,             heterofreq.loc2, NAfreq.loc2)    })    RES <- cbind(RES, res)})
  17: LD.Measures(Geno, V = V.WAIS, S = S.2POP, data = "G", supinfo = TRUE,     expect_equal(LD[173, 11], 0.120879120879121, tolerance = 1e-06)    expect_equal(LD[173, 12], 0, tolerance = 1e-06)})
  30: eval(code, test_env)
  31: eval(code, test_env)
  32: withCallingHandlers({    na.presence = TRUE)
  18: eval(code, test_env)
  19: eval(code, test_env)
  20: withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt)
  21: doTryCatch(return(expr), name, parentenv, handler)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: tryCatchList(expr, classes, parentenv, handlers)
  24: tryCatch(withCallingHandlers({    eval(code, test_env)    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt)
  33: doTryCatch(return(expr), name, parentenv, handler)
  34: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  35: tryCatchList(expr, classes, parentenv, handlers)
  36: tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
  25: doWithOneRestart(return(expr), restart)
  26: withOneRestart(expr, restarts[[1L]])    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }
  27: withRestarts(tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
  37: doWithOneRestart(return(expr), restart)
  38: withOneRestart(expr, restarts[[1L]])
  39: withRestarts(tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal),     end_test = function() {    })
  28: test_code(code, parent.frame())
  29: test_that("LD measures", {    data(data.test)    Geno <- data.test[[1]]    V.WAIS <- data.test[[2]]    S.2POP <- data.test[[3]]        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal),     LD <- LD.Measures(Geno, V = V.WAIS, S = S.2POP, data = "G",         supinfo = TRUE, na.presence = TRUE)    expect_equal(LD[173, 3], 0.00736549685246069, tolerance = 1e-06)    expect_equal(LD[173, 4], 0.0096994662565902, tolerance = 1e-06)    expect_equal(LD[173, 5], 0.0115996465046284, tolerance = 1e-06)    expect_equal(LD[173, 6], 0.0103672763202665, tolerance = 1e-06)    expect_equal(LD[173, 7], 0.021978021978022, tolerance = 1e-06)    expect_equal(LD[173, 8], 0.043956043956044, tolerance = 1e-06)    expect_equal(LD[173, 9], 0, tolerance = 1e-06)    expect_equal(LD[173, 10], 0.0934065934065934, tolerance = 1e-06)    expect_equal(LD[173, 11], 0.120879120879121, tolerance = 1e-06)    expect_equal(LD[173, 12], 0, tolerance = 1e-06)})
  30: eval(code, test_env)
  31: eval(code, test_env)
  32:     end_test = function() {    })
  40: test_code(code = exprs, env = env, reporter = get_reporter() %||%     StopReporter$new())
  41: source_file(path, env = env(env), desc = desc, shuffle = shuffle,     error_call = error_call)
  42: FUN(X[[i]], ...)
  43: withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle,     error_call = error_call)
  44: doTryCatch(return(expr), name, parentenv, handler)
  45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  46: tryCatchList(expr, classes, parentenv, handlers)
  47: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt)
  33: doTryCatch(return(expr), name, parentenv, handler)
      NULL})
  48: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, desc = desc, shuffle = shuffle, error_call = error_call))
  49: 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, shuffle = shuffle,     error_call = error_call)
  50: 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, shuffle = shuffle)
  51: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  52: test_check("LDcorSV")34: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  35: tryCatchList(expr, classes, parentenv, handlers)
  36: tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {
  An irrecoverable exception occurred. R is aborting now ...
          skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
  37: doWithOneRestart(return(expr), restart)
  38: withOneRestart(expr, restarts[[1L]])
  39: withRestarts(tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal),     end_test = function() {    })
  40: test_code(code = exprs, env = env, reporter = get_reporter() %||%     StopReporter$new())
  41: source_file(path, env = env(env), desc = desc, shuffle = shuffle,     error_call = error_call)
  42: FUN(X[[i]], ...)
  43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle,     error_call = error_call)
  44: doTryCatch(return(expr), name, parentenv, handler)
  45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  46: tryCatchList(expr, classes, parentenv, handlers)
  47: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  48: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, desc = desc, shuffle = shuffle, error_call = error_call))
  49: 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, shuffle = shuffle,     error_call = error_call)
  50: 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, shuffle = shuffle)
  51: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  52: test_check("LDcorSV")
  An irrecoverable exception occurred. R is aborting now ...
  Saving _problems/test-LDcorSV-17.R
  [ FAIL 1 | WARN 1 | SKIP 0 | PASS 4 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-LDcorSV.R:17:5'): LD measures ──────────────────────────────────
  Error in `matrix(unlist(RES), nrow = length(RES[[1]][, 1]))`: 'data' must be of a vector type, was 'NULL'
  Backtrace:
      ▆
   1. └─LDcorSV::LD.Measures(...) at test-LDcorSV.R:17:5
   2.   └─base::matrix(unlist(RES), nrow = length(RES[[1]][, 1]))
  
  [ FAIL 1 | WARN 1 | SKIP 0 | PASS 4 ]
  Error:
  ! Test failures.
  Execution halted