Running ‘testthat.R’ [0s/0s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(pdSpecEst)
  > 
  > test_check("pdSpecEst")
  
   *** caught segfault ***
  address 0x0, cause 'invalid permissions'
  
  Traceback:
   1: Expm(diag(2, 2), H.coeff(v0/sqrt(2 * pi) * exp(-((t - 0.5)/0.3)^2/2),     inverse = TRUE))
   2: FUN(X[[i]], ...)
   3: lapply(X = X, FUN = FUN, ...)
   4: sapply(x, function(t) {    Expm(diag(2, 2), H.coeff(v0/sqrt(2 * pi) * exp(-((t - 0.5)/0.3)^2/2),         inverse = TRUE))}, simplify = "array")
   5: rExamples1D(n, 2, "gaussian", return.ts = T, noise = "periodogram")
   6: eval(code, test_env)
   7: eval(code, test_env)
   8: 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)
   9: doTryCatch(return(expr), name, parentenv, handler)
  10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  11: tryCatchList(expr, classes, parentenv, handlers)
  12: 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)
  13: doWithOneRestart(return(expr), restart)
  14: withOneRestart(expr, restarts[[1L]])
  15: 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() {    })
  16: test_code(code, parent.frame())
  17: test_that("Correctly working 1D spectral estimation and clustering",     {        n <- 2^7        d <- 2        S <- 5        example <- rExamples1D(n, 2, "gaussian", return.ts = T,             noise = "periodogram")        expect_equal(dim(example$f), c(d, d, n))        expect_equal(dim(example$P), c(d, d, n))        expect_equal(dim(example$ts), c(2 * n, d))        ts.sim <- rARMA(n, d, array(0, c(d, d, 2)), array(0,             c(d, d, 2)), diag(d))        expect_type(ts.sim$X, "double")        expect_equal(dim(ts.sim$X), c(n, d))        pgram <- pdPgram(example$ts)        expect_equal(dim(pgram$P), c(d, d, n))        expect_equal(length(pgram$freq), n)        expect_equal(pgram$P, example$P)        wt1 <- WavTransf1D(example$P, periodic = T)        wt2 <- WavTransf1D(example$P, metric = "logEuclidean")        expect_equal(length(unlist(wt1$D)), length(unlist(wt1$D.white)))        expect_equal(length(unlist(wt2$D)), length(unlist(wt2$D.white)))        expect_equal(InvWavTransf1D(wt1$D, wt1$M0, periodic = T),             example$P)        expect_equal(InvWavTransf1D(wt2$D, wt2$M0, metric = "logEuclidean"),             example$P)        wt1_den <- pdCART(wt1$D, wt1$D.white, order = 5, periodic = T)        wt2_den <- pdCART(wt2$D, wt2$D.white, order = 5)        expect_length(unlist(wt1_den$w), length(unlist(wt2_den$w)))        expect_length(unlist(wt1_den$D_w), length(unlist(wt1$D)))        expect_length(unlist(wt2_den$D_w), length(unlist(wt2$D)))        f1 <- pdSpecEst1D(example$P)        f2 <- pdSpecEst1D(example$P, metric = "logEuclidean")        expect_is(f1$f, is(example$P))        expect_equal(dim(f1$f), dim(example$P))        expect_type(f1$D[[1]], "complex")        expect_type(f2$D[[1]], "complex")        expect_length(unlist(f1$D), 300)        expect_length(unlist(f2$D), 300)        expect_length(c(f1$M0), 20)        expect_length(c(f2$M0), 20)        expect_type(f1$tree.weights[[1]], "logical")        expect_type(f2$tree.weights[[1]], "logical")        expect_length(unlist(f1$tree.weights), 62)        expect_length(unlist(f2$tree.weights), 62)        cl <- pdkMeans(example$P[, , 1:10], K = 2)        expect_true(all(cl$cl.assignments %in% c(0, 1)))        expect_equal(sum(cl$cl.assignments), 10)        expect_equal(dim(cl$cl.assignments), c(10, 2))        expect_equal(dim(cl$cl.centroids), c(2, 2, 2))        P_s <- rExamples1D(n, 2, "gaussian", replicates = S)$P        cl <- pdSpecClust1D(P_s, K = 2, metric = "logEuclidean")        expect_equal(sum(cl$cl.prob), S)        expect_length(cl$cl.centers.D, 2)        expect_length(unlist(cl$cl.centers.D[[1]]), 300)        expect_length(unlist(cl$cl.centers.D[[2]]), 300)        expect_equal(dim(cl$cl.centers.M0[[1]]), dim(wt1$M0))        expect_equal(dim(cl$cl.centers.M0[[2]]), dim(wt1$M0))        expect_type(cl$cl.jmax, "double")        f3 <- pdSplineReg(example$f, example$f, lam = 0.1, Nd = 10,             max.iter = 10)        expect_equal(dim(f3$f), c(d, d, 10))        expect_type(f3$cost, "double")        expect_type(f3$total_iter, "double")    })
  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)    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]])
  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) {    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 = exprs, env = env, reporter = get_reporter() %||%     StopReporter$new())
  29: source_file(path, env = env(env), desc = desc, shuffle = shuffle,     error_call = error_call)
  30: FUN(X[[i]], ...)
  31: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle,     error_call = error_call)
  32: doTryCatch(return(expr), name, parentenv, handler)
  33: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  34: tryCatchList(expr, classes, parentenv, handlers)
  35: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  36: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, desc = desc, shuffle = shuffle, error_call = error_call))
  37: 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)
  38: 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)
  39: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  40: test_check("pdSpecEst")
  An irrecoverable exception occurred. R is aborting now ...