CRAN Package Check Results for Package missSBM

Last updated on 2026-10-22 01:55:15 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.1.0 80.98 341.84 422.82 OK
r-devel-linux-x86_64-debian-gcc 1.1.0 59.86 235.73 295.59 OK
r-devel-linux-x86_64-fedora-clang 1.1.0 57.00 247.35 304.35 OK
r-devel-linux-x86_64-fedora-gcc 1.1.0 64.00 237.71 301.71 OK
r-devel-windows-x86_64 1.1.0 91.00 420.00 511.00 OK
r-patched-linux-x86_64 1.1.0 85.58 342.08 427.66 OK
r-release-linux-x86_64 1.1.0 86.79 329.37 416.16 OK
r-release-macos-arm64 1.1.0 17.00 92.00 109.00 OK
r-release-macos-x86_64 1.1.0 59.00 456.00 515.00 OK
r-release-windows-x86_64 1.1.0 93.00 345.00 438.00 OK
r-oldrel-macos-arm64 1.1.0 20.00 93.00 113.00 ERROR
r-oldrel-macos-x86_64 1.1.0 59.00 679.00 738.00 OK
r-oldrel-windows-x86_64 1.1.0 121.00 474.00 595.00 OK

Check Details

Version: 1.1.0
Check: tests
Result: ERROR Running ‘spelling.R’ [0s/0s] Running ‘testthat.R’ [35s/32s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(missSBM) > > test_check("missSBM") Adjusting Variational EM for Stochastic Block Model Dyads are distributed according to a 'undirected' SBM. Imputation assumes a 'covar-dyad' network-sampling process iteration #: 2 iteration #: 3 Adjusting Variational EM for Stochastic Block Model Dyads are distributed according to a 'undirected' SBM. Imputation assumes a 'dyad' network-sampling process iteration #: 2 iteration #: 3 Adjusting Variational EM for Stochastic Block Model Dyads are distributed according to a 'undirected' SBM. Imputation assumes a 'covar-node' network-sampling process iteration #: 2 iteration #: 3 iteration #: 4 iteration #: 5 Adjusting Variational EM for Stochastic Block Model Dyads are distributed according to a 'undirected' SBM. Imputation assumes a 'node' network-sampling process iteration #: 2 iteration #: 3 iteration #: 4 Tested sampling: - dyad - node - double-standard - block-node - block-dyad Adjusting Variational EM for Stochastic Block Model Imputation assumes a 'dyad' network-sampling process Initialization of 3 model(s). Tested sampling: - dyad - node - double-standard - block-node - block-dyad - degreeTested sampling: - dyad - node - double-standard - block-node - block-dyad - degree sampling: dyad new better on connectivity node double-standard block-node new better on mixture Adjusting Variational EM for Stochastic Block Model iteration #: 2 iteration #: 3 iteration #: 4 iteration #: 5 iteration #: 6 iteration #: 7 iteration #: 8 iteration #: 9 iteration #: 10 iteration #: 11 iteration #: 12 iteration #: 13 iteration #: 14 iteration #: 15 iteration #: 16 iteration #: 17 iteration #: 18 iteration #: 19 iteration #: 20 iteration #: 21 iteration #: 22 iteration #: 23 iteration #: 24 iteration #: 25 iteration #: 26 iteration #: 27 iteration #: 28 iteration #: 29 iteration #: 30 iteration #: 31 iteration #: 32 iteration #: 33 iteration #: 34 Adjusting Variational EM for Stochastic Block Model Dyads are distributed according to a 'undirected' SBM. Imputation assumes a 'node' network-sampling process iteration #: 2 iteration #: 3 iteration #: 4 iteration #: 5 iteration #: 6 iteration #: 7 iteration #: 8 iteration #: 9 iteration #: 10 iteration #: 11 iteration #: 12 iteration #: 13 iteration #: 14 iteration #: 15 iteration #: 16 iteration #: 17 iteration #: 18 iteration #: 19 iteration #: 20 iteration #: 21 iteration #: 22 iteration #: 23 iteration #: 24 iteration #: 25 iteration #: 26 iteration #: 27 iteration #: 28 iteration #: 29 iteration #: 30 iteration #: 31 iteration #: 32 iteration #: 33 iteration #: 34 Adjusting Variational EM for Stochastic Block Model Imputation assumes a 'node' network-sampling process Initialization of 1 model(s). Performing VEM inference Model with 3 blocks. Adjusting Variational EM for Stochastic Block Model Imputation assumes a 'dyad' network-sampling process Initialization of 2 model(s). Performing VEM inference Model with 2 blocks. Model with 1 blocks. Polishing (node-swap) Looking for better solutions Pass 1 Going forward + Pass 1 Going backward + *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE) 2: FUN(X[[i]], ...) 3: lapply(X = S, FUN = FUN, ...) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: 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) 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))}) 8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 10: FUN(X[[i]], ...) 11: lapply(seq_len(cores), inner.do) 12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE) 13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4)) 14: .self$do_with_inits(inits, Q, reinitialization_effort) 15: .self$estim_ascend(reinitialization_effort, changing_effort) 16: private$BMobject$estimate() 17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) 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") Traceback: 1: dispatcher(membership_name, membership_init$to_cc(), model_name, }, skip = handle_skip, warning = handle_warning, message = handle_message, .self$network_to_cc(), TRUE) error = handle_error, interrupt = handle_interrupt) 2: FUN(X[[i]], ...) 21: doTryCatch(return(expr), name, parentenv, handler) 3: lapply(X = S, FUN = FUN, ...)22: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 4: 23: doTryCatch(return(expr), name, parentenv, handler) tryCatchList(expr, classes, parentenv, handlers) 5: 24: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatch(withCallingHandlers({ eval(code, test_env) 6: new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN")tryCatchList(expr, classes, parentenv, handlers) } else if (!new_expectations && skip_on_empty) { 7: skip_empty()tryCatch(expr, error = function(e) { call <- conditionCall(e) } if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) }, expectation = handle_expectation, packageNotFoundError = function(e) { call <- sys.call(-4L) if (on_cran()) { dcall <- deparse(call, nlines = 1L) skip(paste0("{", e$package, "} is not installed.")) prefix <- paste("Error in", dcall, ": ") } LONG <- 75L}, snapshot_on_cran = function(cnd) { sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) snapshot_skipped <<- TRUE w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, if (w > LONG) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) prefix <- paste0(prefix, "\n ")25: doWithOneRestart(return(expr), restart) } else prefix <- "Error : "26: msg <- paste0(prefix, conditionMessage(e), "\n")withOneRestart(expr, restarts[[1L]]) .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile)27: .Internal(printDeferredWarnings()) }withRestarts(tryCatch(withCallingHandlers({ invisible(structure(msg, class = "try-error", condition = e))}) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations 8: if (snapshot_skipped) {try(lapply(X = S, FUN = FUN, ...), silent = TRUE) skip("On CRAN") 9: }sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) else if (!new_expectations && skip_on_empty) { skip_empty()10: }FUN(X[[i]], ...)}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {11: skip(paste0("{", e$package, "} is not installed."))lapply(seq_len(cores), inner.do) } }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE12: invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), mc.silent = TRUE) end_test = function() { })13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 28: verbose = (verbosity > 4)) test_code(code, parent.frame()) 14: .self$do_with_inits(inits, Q, reinitialization_effort)29: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", 15: .self$estim_ascend(reinitialization_effort, changing_effort) { sampler_undirected_cov$rNetwork(store = TRUE)16: mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, private$BMobject$estimate() "bernoulli", FALSE, covarList = covarList_undirected) 17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) plot = FALSE))18: mySBM_sbm$setModel(Q)eval(code, test_env) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, covariates = covarList_undirected) cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]]19: mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, eval(code, test_env) clusterInit = cl, covarList = covarList_undirected)20: mySBM_missSBM$doVEM()withCallingHandlers({ expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), eval(code, test_env) 0.05) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.8) skip("On CRAN") } expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), else if (!new_expectations && skip_on_empty) { skip_empty() 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), }}, expectation = handle_expectation, packageNotFoundError = function(e) { 0.1) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) } 0.1)}, snapshot_on_cran = function(cnd) { expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") 0.85)}, skip = handle_skip, warning = handle_warning, message = handle_message, }) error = handle_error, interrupt = handle_interrupt) 30: 21: doTryCatch(return(expr), name, parentenv, handler) eval(code, test_env) 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])31: eval(code, test_env) 23: tryCatchList(expr, classes, parentenv, handlers) 32: withCallingHandlers({ 24: tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { 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("On CRAN") } skip_empty() else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 33: 25: doTryCatch(return(expr), name, parentenv, handler) doWithOneRestart(return(expr), restart) 26: 34: tryCatchOne(expr, names, parentenv, handlers[[1L]]) withOneRestart(expr, restarts[[1L]]) 27: 35: tryCatchList(expr, classes, parentenv, handlers)withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) 36: new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN")tryCatch(withCallingHandlers({ eval(code, test_env) } else if (!new_expectations && skip_on_empty) { new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip_empty() skip("On CRAN") }}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) { else if (!new_expectations && skip_on_empty) { skip_empty() skip(paste0("{", e$package, "} is not installed.")) } }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, skip(paste0("{", e$package, "} is not installed.")) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { }}, snapshot_on_cran = function(cnd) { }) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")28: test_code(code, parent.frame())}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 29: 37: doWithOneRestart(return(expr), restart)test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", {38: withOneRestart(expr, restarts[[1L]]) sampler_undirected_cov$rNetwork(store = TRUE) 39: mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, withRestarts(tryCatch(withCallingHandlers({ "bernoulli", FALSE, covarList = covarList_undirected) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") mySBM_sbm$setModel(Q) } else if (!new_expectations && skip_on_empty) { skip_empty() net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, covariates = covarList_undirected) }}, expectation = handle_expectation, packageNotFoundError = function(e) { cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) } clusterInit = cl, covarList = covarList_undirected) mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE 0.05) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, 0.8) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 0.01) end_test = function() { }) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), 0.1) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), 40: 0.1)test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new()) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), 41: 0.85) })source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call) 30: eval(code, test_env)42: FUN(X[[i]], ...) 31: eval(code, test_env) 43: 32: withCallingHandlers({lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations error_call = error_call) if (snapshot_skipped) { skip("On CRAN")44: } else if (!new_expectations && skip_on_empty) {doTryCatch(return(expr), name, parentenv, handler) skip_empty()45: }tryCatchOne(expr, names, parentenv, handlers[[1L]]) }, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))46: tryCatchList(expr, classes, parentenv, handlers) }}, snapshot_on_cran = function(cnd) { 47: snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") error = handle_error, interrupt = handle_interrupt) 33: NULL})doTryCatch(return(expr), name, parentenv, handler) 48: 34: with_reporter(reporters$multi, lapply(test_paths, test_one_file, tryCatchOne(expr, names, parentenv, handlers[[1L]]) env = env, desc = desc, shuffle = shuffle, error_call = error_call)) 49: 35: test_files_serial(test_dir = test_dir, test_package = test_package, tryCatchList(expr, classes, parentenv, handlers) 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, 36: error_call = error_call)tryCatch(withCallingHandlers({ 50: eval(code, test_env) new_expectations <- the$test_expectations > starting_expectationstest_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, if (snapshot_skipped) { stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle) skip("On CRAN") } else if (!new_expectations && skip_on_empty) {51: test_dir("testthat", package = package, reporter = reporter, skip_empty() ..., load_package = "installed") } }, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))52: test_check("missSBM") }}, snapshot_on_cran = function(cnd) { An irrecoverable exception occurred. R is aborting now ... 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("missSBM") An irrecoverable exception occurred. R is aborting now ... Saving _problems/test-sbm-bernoulli-with-covariates-16.R *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE) 2: FUN(X[[i]], ...) 3: Traceback: 1: lapply(X = S, FUN = FUN, ...)dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE) 4: doTryCatch(return(expr), name, parentenv, handler) 2: FUN(X[[i]], ...) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 3: 6: lapply(X = S, FUN = FUN, ...)tryCatchList(expr, classes, parentenv, handlers) 4: 7: doTryCatch(return(expr), name, parentenv, handler)tryCatch(expr, error = function(e) { call <- conditionCall(e) 5: if (!is.null(call)) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) 6: dcall <- deparse(call, nlines = 1L)tryCatchList(expr, classes, parentenv, handlers) prefix <- paste("Error in", dcall, ": ") 7: LONG <- 75LtryCatch(expr, error = function(e) { sm <- strsplit(conditionMessage(e), "\n")[[1L]] call <- conditionCall(e) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], if (!is.null(call)) { type = "b") if (identical(call[[1L]], quote(doTryCatch))) if (w > LONG) call <- sys.call(-4L) prefix <- paste0(prefix, "\n ") dcall <- deparse(call, nlines = 1L) } prefix <- paste("Error in", dcall, ": ") LONG <- 75L else prefix <- "Error : " sm <- strsplit(conditionMessage(e), "\n")[[1L]] msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (!silent && isTRUE(getOption("show.error.messages"))) { if (is.na(w)) cat(msg, file = outFile) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") .Internal(printDeferredWarnings()) if (w > LONG) } prefix <- paste0(prefix, "\n ") invisible(structure(msg, class = "try-error", condition = e)) }}) else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") 8: .Internal(seterrmessage(msg[1L]))try(lapply(X = S, FUN = FUN, ...), silent = TRUE) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) 9: .Internal(printDeferredWarnings())sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) } invisible(structure(msg, class = "try-error", condition = e))10: })FUN(X[[i]], ...) 8: 11: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)lapply(seq_len(cores), inner.do) 9: 12: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)10: FUN(X[[i]], ...)13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 11: verbose = (verbosity > 4))lapply(seq_len(cores), inner.do) 14: .self$do_with_inits(inits, Q, reinitialization_effort)12: 15: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, .self$estim_ascend(reinitialization_effort, changing_effort) mc.silent = TRUE) 16: 13: private$BMobject$estimate()parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4))17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) 14: 18: .self$do_with_inits(inits, Q, reinitialization_effort)eval(code, test_env) 15: 19: .self$estim_ascend(reinitialization_effort, changing_effort)eval(code, test_env) 16: 20: private$BMobject$estimate() withCallingHandlers({17: eval(code, test_env)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {18: skip("On CRAN")eval(code, test_env) } else if (!new_expectations && skip_on_empty) {19: eval(code, test_env) skip_empty() } }, expectation = handle_expectation, packageNotFoundError = function(e) {20: if (on_cran()) {withCallingHandlers({ skip(paste0("{", e$package, "} is not installed.")) eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, snapshot_on_cran = function(cnd) { if (snapshot_skipped) { snapshot_skipped <<- TRUE skip("On CRAN") invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, else if (!new_expectations && skip_on_empty) { error = handle_error, interrupt = handle_interrupt) skip_empty() }21: }, expectation = handle_expectation, packageNotFoundError = function(e) {doTryCatch(return(expr), name, parentenv, handler) if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }22: }, snapshot_on_cran = function(cnd) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) snapshot_skipped <<- TRUE 23: invokeRestart("muffle_cran_snapshot")tryCatchList(expr, classes, parentenv, handlers)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt) 24: 21: tryCatch(withCallingHandlers({doTryCatch(return(expr), name, parentenv, handler) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations22: if (snapshot_skipped) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) skip("On CRAN") }23: else if (!new_expectations && skip_on_empty) {tryCatchList(expr, classes, parentenv, handlers) skip_empty() } }, expectation = handle_expectation, packageNotFoundError = function(e) {24: if (on_cran()) {tryCatch(withCallingHandlers({ skip(paste0("{", e$package, "} is not installed.")) eval(code, test_env) }}, snapshot_on_cran = function(cnd) { new_expectations <- the$test_expectations > starting_expectations snapshot_skipped <<- TRUE if (snapshot_skipped) { invokeRestart("muffle_cran_snapshot") skip("On CRAN")}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal) else if (!new_expectations && skip_on_empty) { skip_empty()25: doWithOneRestart(return(expr), restart) } }, expectation = handle_expectation, packageNotFoundError = function(e) {26: withOneRestart(expr, restarts[[1L]]) if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))27: withRestarts(tryCatch(withCallingHandlers({ } eval(code, test_env)}, snapshot_on_cran = function(cnd) { new_expectations <- the$test_expectations > starting_expectations snapshot_skipped <<- TRUE if (snapshot_skipped) { skip("On CRAN") invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal) else if (!new_expectations && skip_on_empty) {25: skip_empty()doWithOneRestart(return(expr), restart) } }, expectation = handle_expectation, packageNotFoundError = function(e) {26: if (on_cran()) {withOneRestart(expr, restarts[[1L]]) skip(paste0("{", e$package, "} is not installed.")) } }, snapshot_on_cran = function(cnd) {27: snapshot_skipped <<- TRUEwithRestarts(tryCatch(withCallingHandlers({ invokeRestart("muffle_cran_snapshot") eval(code, test_env)}, skip = handle_skip, warning = handle_warning, message = handle_message, new_expectations <- the$test_expectations > starting_expectations error = handle_error, interrupt = handle_interrupt), error = handle_fatal), if (snapshot_skipped) { end_test = function() { skip("On CRAN") }) } else if (!new_expectations && skip_on_empty) {28: skip_empty()test_code(code, parent.frame()) }29: }, expectation = handle_expectation, packageNotFoundError = function(e) {test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", if (on_cran()) { { skip(paste0("{", e$package, "} is not installed.")) sampler_directed_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, } "bernoulli", TRUE, covarList = covarList_directed)}, snapshot_on_cran = function(cnd) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) snapshot_skipped <<- TRUE mySBM_sbm$setModel(Q) invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), covariates = covarList_directed) end_test = function() { cls <- net$clustering(1:(2 * Q)) }) cl <- cls[[Q]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, 28: clusterInit = cl, covarList = covarList_directed)test_code(code, parent.frame()) mySBM_missSBM$doVEM(trace = TRUE) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 29: 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", 0.8) { sampler_directed_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), "bernoulli", TRUE, covarList = covarList_directed) 0.05) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), plot = FALSE)) 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), mySBM_sbm$setModel(Q) 0.85) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, covariates = covarList_directed) }) cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]]30: mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, eval(code, test_env) clusterInit = cl, covarList = covarList_directed) mySBM_missSBM$doVEM(trace = TRUE) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 31: 0.1)eval(code, test_env) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.8)32: expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), withCallingHandlers({ 0.05) eval(code, test_env) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), new_expectations <- the$test_expectations > starting_expectations 0.1) if (snapshot_skipped) { expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), skip("On CRAN") 0.85) } else if (!new_expectations && skip_on_empty) { }) skip_empty()30: }eval(code, test_env)}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))31: }eval(code, test_env)}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE32: invokeRestart("muffle_cran_snapshot")withCallingHandlers({ eval(code, test_env)}, skip = handle_skip, warning = handle_warning, message = handle_message, new_expectations <- the$test_expectations > starting_expectations error = handle_error, interrupt = handle_interrupt) if (snapshot_skipped) { 33: skip("On CRAN")doTryCatch(return(expr), name, parentenv, handler) } else if (!new_expectations && skip_on_empty) { skip_empty()34: }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {35: skip(paste0("{", e$package, "} is not installed.")) }tryCatchList(expr, classes, parentenv, handlers)}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")36: }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations33: doTryCatch(return(expr), name, parentenv, handler) if (snapshot_skipped) { skip("On CRAN")34: } else if (!new_expectations && skip_on_empty) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) skip_empty() }35: tryCatchList(expr, classes, parentenv, handlers)}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {36: tryCatch(withCallingHandlers({ skip(paste0("{", e$package, "} is not installed.")) eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, snapshot_on_cran = function(cnd) { if (snapshot_skipped) { snapshot_skipped <<- TRUE skip("On CRAN") invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) else if (!new_expectations && skip_on_empty) { skip_empty()37: }doWithOneRestart(return(expr), restart)}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {38: skip(paste0("{", e$package, "} is not installed."))withOneRestart(expr, restarts[[1L]]) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE39: invokeRestart("muffle_cran_snapshot")withRestarts(tryCatch(withCallingHandlers({}, skip = handle_skip, warning = handle_warning, message = handle_message, eval(code, test_env) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {37: skip("On CRAN")doWithOneRestart(return(expr), restart) } else if (!new_expectations && skip_on_empty) {38: skip_empty()withOneRestart(expr, restarts[[1L]]) }39: }, expectation = handle_expectation, packageNotFoundError = function(e) {withRestarts(tryCatch(withCallingHandlers({ if (on_cran()) { eval(code, test_env) skip(paste0("{", e$package, "} is not installed.")) new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) {}, snapshot_on_cran = function(cnd) { skip("On CRAN") snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot") else if (!new_expectations && skip_on_empty) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip_empty() error = handle_error, interrupt = handle_interrupt), error = handle_fatal), } end_test = function() {}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { }) skip(paste0("{", e$package, "} is not installed.")) }40: }, snapshot_on_cran = function(cnd) {test_code(code = exprs, env = env, reporter = get_reporter() %||% snapshot_skipped <<- TRUE StopReporter$new()) invokeRestart("muffle_cran_snapshot") }, skip = handle_skip, warning = handle_warning, message = handle_message, 41: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), source_file(path, env = env(env), desc = desc, shuffle = shuffle, end_test = function() { error_call = error_call) })42: FUN(X[[i]], ...)40: test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, 41: error_call = error_call)source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)44: doTryCatch(return(expr), name, parentenv, handler)42: FUN(X[[i]], ...) 45: 43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, tryCatchOne(expr, names, parentenv, handlers[[1L]]) error_call = error_call) 46: 44: tryCatchList(expr, classes, parentenv, handlers)doTryCatch(return(expr), name, parentenv, handler) 47: 45: tryCatch(code, testthat_abort_reporter = function(cnd) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) cat(conditionMessage(cnd), "\n") NULL46: tryCatchList(expr, classes, parentenv, handlers)}) 48: 47: with_reporter(reporters$multi, lapply(test_paths, test_one_file, tryCatch(code, testthat_abort_reporter = function(cnd) { env = env, desc = desc, shuffle = shuffle, error_call = error_call)) cat(conditionMessage(cnd), "\n") NULL49: })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, 48: desc = desc, load_package = load_package, shuffle = shuffle, with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)) error_call = error_call) 49: 50: test_files_serial(test_dir = test_dir, test_package = test_package, test_files(test_dir = path, test_paths = test_paths, test_package = 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, reporter = reporter, load_helpers = load_helpers, env = env, desc = desc, load_package = load_package, shuffle = shuffle, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle) error_call = error_call) 50: 51: test_files(test_dir = path, test_paths = test_paths, test_package = package, test_dir("testthat", package = package, reporter = reporter, reporter = reporter, load_helpers = load_helpers, env = env, ..., load_package = "installed") stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 52: load_package = load_package, parallel = parallel, shuffle = shuffle)test_check("missSBM") 51: An irrecoverable exception occurred. R is aborting now ... test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed") 52: test_check("missSBM") An irrecoverable exception occurred. R is aborting now ... Saving _problems/test-sbm-bernoulli-with-covariates-46.R *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE) 2: FUN(X[[i]], ...) 3: lapply(X = S, FUN = FUN, ...) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: 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) 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))}) 8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 10: FUN(X[[i]], ...) 11: lapply(seq_len(cores), inner.do) 12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE) 13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4)) 14: .self$do_with_inits(inits, Q, reinitialization_effort) 15: .self$estim_ascend(reinitialization_effort, changing_effort) 16: private$BMobject$estimate() 17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) 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") Traceback: 1: } else if (!new_expectations && skip_on_empty) {dispatcher(membership_name, membership_init$to_cc(), model_name, skip_empty() .self$network_to_cc(), TRUE) }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { 2: skip(paste0("{", e$package, "} is not installed.")) }FUN(X[[i]], ...)}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE 3: invokeRestart("muffle_cran_snapshot")lapply(X = S, FUN = FUN, ...)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 4: end_test = function() { })doTryCatch(return(expr), name, parentenv, handler) 28: 5: test_code(code, parent.frame()) tryCatchOne(expr, names, parentenv, handlers[[1L]])29: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", 6: {tryCatchList(expr, classes, parentenv, handlers) sampler_undirected_nocov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, 7: "bernoulli", FALSE)tryCatch(expr, error = function(e) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) call <- conditionCall(e) mySBM_sbm$setModel(3) if (!is.null(call)) { net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) if (identical(call[[1L]], quote(doTryCatch))) cl <- net$clustering(3)[[1]] call <- sys.call(-4L) mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") clusterInit = cl) LONG <- 75L mySBM_missSBM$doVEM() sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.05) if (is.na(w)) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 0.95) type = "b") expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), if (w > LONG) 0.01) prefix <- paste0(prefix, "\n ") expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), } 0.05) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), else prefix <- "Error : " 0.95) msg <- paste0(prefix, conditionMessage(e), "\n") }) .Internal(seterrmessage(msg[1L])) 30: if (!silent && isTRUE(getOption("show.error.messages"))) {eval(code, test_env) cat(msg, file = outFile) .Internal(printDeferredWarnings())31: eval(code, test_env) } 32: invisible(structure(msg, class = "try-error", condition = e))withCallingHandlers({}) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations 8: if (snapshot_skipped) {try(lapply(X = S, FUN = FUN, ...), silent = TRUE) skip("On CRAN") } 9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) else if (!new_expectations && skip_on_empty) { skip_empty()10: }FUN(X[[i]], ...)}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {11: skip(paste0("{", e$package, "} is not installed."))lapply(seq_len(cores), inner.do) }12: }, snapshot_on_cran = function(cnd) {parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")13: }, skip = handle_skip, warning = handle_warning, message = handle_message, parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, error = handle_error, interrupt = handle_interrupt) verbose = (verbosity > 4)) 33: 14: doTryCatch(return(expr), name, parentenv, handler) .self$do_with_inits(inits, Q, reinitialization_effort)34: tryCatchOne(expr, names, parentenv, handlers[[1L]])15: .self$estim_ascend(reinitialization_effort, changing_effort)35: tryCatchList(expr, classes, parentenv, handlers)16: private$BMobject$estimate() 36: 17: tryCatch(withCallingHandlers({mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations18: if (snapshot_skipped) {eval(code, test_env) skip("On CRAN") }19: else if (!new_expectations && skip_on_empty) {eval(code, test_env) skip_empty() 20: }withCallingHandlers({}, expectation = handle_expectation, packageNotFoundError = function(e) { eval(code, test_env) if (on_cran()) { new_expectations <- the$test_expectations > starting_expectations skip(paste0("{", e$package, "} is not installed.")) if (snapshot_skipped) { }}, snapshot_on_cran = function(cnd) { skip("On CRAN") snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot") else if (!new_expectations && skip_on_empty) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip_empty() error = handle_error, interrupt = handle_interrupt), error = handle_fatal) } }, expectation = handle_expectation, packageNotFoundError = function(e) {37: if (on_cran()) {doWithOneRestart(return(expr), restart) skip(paste0("{", e$package, "} is not installed.")) }38: }, snapshot_on_cran = function(cnd) {withOneRestart(expr, restarts[[1L]]) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")39: }, skip = handle_skip, warning = handle_warning, message = handle_message, withRestarts(tryCatch(withCallingHandlers({ error = handle_error, interrupt = handle_interrupt) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {21: skip("On CRAN")doTryCatch(return(expr), name, parentenv, handler) } else if (!new_expectations && skip_on_empty) { skip_empty()22: }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, expectation = handle_expectation, packageNotFoundError = function(e) { 23: if (on_cran()) {tryCatchList(expr, classes, parentenv, handlers) skip(paste0("{", e$package, "} is not installed.")) }24: }, snapshot_on_cran = function(cnd) {tryCatch(withCallingHandlers({ snapshot_skipped <<- TRUE eval(code, test_env) invokeRestart("muffle_cran_snapshot") new_expectations <- the$test_expectations > starting_expectations}, skip = handle_skip, warning = handle_warning, message = handle_message, if (snapshot_skipped) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), skip("On CRAN") end_test = function() { } }) else if (!new_expectations && skip_on_empty) { skip_empty()40: }test_code(code = exprs, env = env, reporter = get_reporter() %||% }, expectation = handle_expectation, packageNotFoundError = function(e) { StopReporter$new()) if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }41: }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUEsource_file(path, env = env(env), desc = desc, shuffle = shuffle, invokeRestart("muffle_cran_snapshot") error_call = error_call)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)42: FUN(X[[i]], ...)25: 43: doWithOneRestart(return(expr), restart)lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)26: withOneRestart(expr, restarts[[1L]])44: doTryCatch(return(expr), name, parentenv, handler)27: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env)45: new_expectations <- the$test_expectations > starting_expectationstryCatchOne(expr, names, parentenv, handlers[[1L]]) if (snapshot_skipped) { skip("On CRAN")46: }tryCatchList(expr, classes, parentenv, handlers) else if (!new_expectations && skip_on_empty) { skip_empty()47: }tryCatch(code, testthat_abort_reporter = function(cnd) {}, expectation = handle_expectation, packageNotFoundError = function(e) { cat(conditionMessage(cnd), "\n") if (on_cran()) { NULL skip(paste0("{", e$package, "} is not installed."))}) } }, snapshot_on_cran = function(cnd) {48: snapshot_skipped <<- TRUEwith_reporter(reporters$multi, lapply(test_paths, test_one_file, invokeRestart("muffle_cran_snapshot") env = env, desc = desc, shuffle = shuffle, error_call = error_call))}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 49: end_test = function() {test_files_serial(test_dir = test_dir, test_package = test_package, }) test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, 28: env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, test_code(code, parent.frame()) desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call) 29: 50: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", test_files(test_dir = path, test_paths = test_paths, test_package = package, { reporter = reporter, load_helpers = load_helpers, env = env, sampler_undirected_nocov$rNetwork(store = TRUE) stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, load_package = load_package, parallel = parallel, shuffle = shuffle) "bernoulli", FALSE) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, 51: plot = FALSE))test_dir("testthat", package = package, reporter = reporter, mySBM_sbm$setModel(3) ..., load_package = "installed") net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) 52: cl <- net$clustering(3)[[1]]test_check("missSBM") mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, An irrecoverable exception occurred. R is aborting now ... clusterInit = cl) mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.05) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.95) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), 0.05) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), 0.95) }) 30: eval(code, test_env) 31: eval(code, test_env) 32: 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) 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 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) 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("missSBM") An irrecoverable exception occurred. R is aborting now ... Saving _problems/test-sbm-bernoulli-without-covariate-16.R *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE) 2: FUN(X[[i]], ...) 3: lapply(X = S, FUN = FUN, ...) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: 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) 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))}) 8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 10: FUN(X[[i]], ...) 11: lapply(seq_len(cores), inner.do) 12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE) 13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4)) 14: .self$do_with_inits(inits, Q, reinitialization_effort) 15: .self$estim_ascend(reinitialization_effort, changing_effort) 16: private$BMobject$estimate() 17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) 18: eval(code, test_env) 19: eval(code, test_env) Traceback: 1: 20: dispatcher(membership_name, membership_init$to_cc(), model_name, withCallingHandlers({ .self$network_to_cc(), TRUE) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations 2: FUN(X[[i]], ...) if (snapshot_skipped) { skip("On CRAN") 3: }lapply(X = S, FUN = FUN, ...) else if (!new_expectations && skip_on_empty) { skip_empty() 4: }doTryCatch(return(expr), name, parentenv, handler)}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { 5: skip(paste0("{", e$package, "} is not installed."))tryCatchOne(expr, names, parentenv, handlers[[1L]]) } }, snapshot_on_cran = function(cnd) { 6: tryCatchList(expr, classes, parentenv, handlers) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") 7: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatch(expr, error = function(e) { error = handle_error, interrupt = handle_interrupt) call <- conditionCall(e) if (!is.null(call)) {21: if (identical(call[[1L]], quote(doTryCatch))) doTryCatch(return(expr), name, parentenv, handler) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L)22: prefix <- paste("Error in", dcall, ": ")tryCatchOne(expr, names, parentenv, handlers[[1L]]) LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]]23: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")tryCatchList(expr, classes, parentenv, handlers) if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 24: type = "b")tryCatch(withCallingHandlers({ if (w > LONG) eval(code, test_env) prefix <- paste0(prefix, "\n ") new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) { else prefix <- "Error : " skip("On CRAN") msg <- paste0(prefix, conditionMessage(e), "\n") } .Internal(seterrmessage(msg[1L])) else if (!new_expectations && skip_on_empty) { if (!silent && isTRUE(getOption("show.error.messages"))) { skip_empty() cat(msg, file = outFile) } .Internal(printDeferredWarnings())}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) { invisible(structure(msg, class = "try-error", condition = e)) skip(paste0("{", e$package, "} is not installed."))}) } }, snapshot_on_cran = function(cnd) { 8: snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")try(lapply(X = S, FUN = FUN, ...), silent = TRUE)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))25: doWithOneRestart(return(expr), restart)10: FUN(X[[i]], ...)26: withOneRestart(expr, restarts[[1L]])11: lapply(seq_len(cores), inner.do)27: withRestarts(tryCatch(withCallingHandlers({12: eval(code, test_env)parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, new_expectations <- the$test_expectations > starting_expectations mc.silent = TRUE) if (snapshot_skipped) { skip("On CRAN")13: }parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, else if (!new_expectations && skip_on_empty) { verbose = (verbosity > 4)) skip_empty() 14: }.self$do_with_inits(inits, Q, reinitialization_effort)}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {15: skip(paste0("{", e$package, "} is not installed.")).self$estim_ascend(reinitialization_effort, changing_effort) } }, snapshot_on_cran = function(cnd) {16: snapshot_skipped <<- TRUEprivate$BMobject$estimate() invokeRestart("muffle_cran_snapshot") }, skip = handle_skip, warning = handle_warning, message = handle_message, 17: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) end_test = function() { })18: eval(code, test_env)28: test_code(code, parent.frame())19: eval(code, test_env) 29: 20: test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", withCallingHandlers({ { eval(code, test_env) sampler_directed_nocov$rNetwork(store = TRUE) new_expectations <- the$test_expectations > starting_expectations mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, if (snapshot_skipped) { "bernoulli", TRUE) skip("On CRAN") mySBM_sbm$optimize(estimOptions = list(verbosity = 0, } plot = FALSE)) else if (!new_expectations && skip_on_empty) { mySBM_sbm$setModel(3) skip_empty() net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) } cl <- net$clustering(3)[[1]]}, expectation = handle_expectation, packageNotFoundError = function(e) { mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, if (on_cran()) { clusterInit = cl) skip(paste0("{", e$package, "} is not installed.")) mySBM_missSBM$doVEM() } expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), }, snapshot_on_cran = function(cnd) { 0.1) snapshot_skipped <<- TRUE expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), invokeRestart("muffle_cran_snapshot") 0.95)}, skip = handle_skip, warning = handle_warning, message = handle_message, expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), error = handle_error, interrupt = handle_interrupt) 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), 21: 0.1) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), doTryCatch(return(expr), name, parentenv, handler) 0.2) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), 22: 0.95)tryCatchOne(expr, names, parentenv, handlers[[1L]]) }) 23: 30: tryCatchList(expr, classes, parentenv, handlers)eval(code, test_env) 24: 31: tryCatch(withCallingHandlers({eval(code, test_env) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations32: if (snapshot_skipped) {withCallingHandlers({ skip("On CRAN") eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations else if (!new_expectations && skip_on_empty) { if (snapshot_skipped) { skip_empty() skip("On CRAN") } }}, expectation = handle_expectation, packageNotFoundError = function(e) { else if (!new_expectations && skip_on_empty) { if (on_cran()) { skip_empty() skip(paste0("{", e$package, "} is not installed.")) } }}, expectation = handle_expectation, packageNotFoundError = function(e) {}, snapshot_on_cran = function(cnd) { if (on_cran()) { snapshot_skipped <<- TRUE skip(paste0("{", e$package, "} is not installed.")) invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, }, snapshot_on_cran = function(cnd) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")25: }, skip = handle_skip, warning = handle_warning, message = handle_message, doWithOneRestart(return(expr), restart) error = handle_error, interrupt = handle_interrupt) 26: 33: doTryCatch(return(expr), name, parentenv, handler)withOneRestart(expr, restarts[[1L]]) 34: 27: tryCatchOne(expr, names, parentenv, handlers[[1L]])withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env)35: tryCatchList(expr, classes, parentenv, handlers) new_expectations <- the$test_expectations > starting_expectations36: if (snapshot_skipped) {tryCatch(withCallingHandlers({ skip("On CRAN") eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations else if (!new_expectations && skip_on_empty) { if (snapshot_skipped) { skip_empty() skip("On CRAN") } } else if (!new_expectations && skip_on_empty) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip_empty() if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) {}, snapshot_on_cran = function(cnd) { skip(paste0("{", e$package, "} is not installed.")) } snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, 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), }, skip = handle_skip, warning = handle_warning, message = handle_message, end_test = function() { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) }) 37: 28: doWithOneRestart(return(expr), restart)test_code(code, parent.frame()) 29: test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", 38: withOneRestart(expr, restarts[[1L]]) { sampler_directed_nocov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, 39: "bernoulli", TRUE)withRestarts(tryCatch(withCallingHandlers({ mySBM_sbm$optimize(estimOptions = list(verbosity = 0, eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations plot = FALSE)) if (snapshot_skipped) { mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) skip("On CRAN") cl <- net$clustering(3)[[1]] } mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, else if (!new_expectations && skip_on_empty) { skip_empty() clusterInit = cl) } mySBM_missSBM$doVEM()}, expectation = handle_expectation, packageNotFoundError = function(e) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), if (on_cran()) { 0.1) skip(paste0("{", e$package, "} is not installed.")) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), } 0.95)}, snapshot_on_cran = function(cnd) { expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), snapshot_skipped <<- TRUE 0.01) invokeRestart("muffle_cran_snapshot") expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), }, skip = handle_skip, warning = handle_warning, message = handle_message, 0.1) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), }) 0.2)40: expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new()) 0.95) })41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, 30: eval(code, test_env) error_call = error_call) 31: eval(code, test_env)42: FUN(X[[i]], ...)32: withCallingHandlers({43: eval(code, test_env)lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, new_expectations <- the$test_expectations > starting_expectations error_call = error_call) if (snapshot_skipped) { skip("On CRAN")44: }doTryCatch(return(expr), name, parentenv, handler) else if (!new_expectations && skip_on_empty) { skip_empty()45: }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))46: }tryCatchList(expr, classes, parentenv, handlers)}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE47: invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatch(code, testthat_abort_reporter = function(cnd) { error = handle_error, interrupt = handle_interrupt) cat(conditionMessage(cnd), "\n") NULL33: })doTryCatch(return(expr), name, parentenv, handler) 48: 34: tryCatchOne(expr, names, parentenv, handlers[[1L]])with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))35: tryCatchList(expr, classes, parentenv, handlers)49: test_files_serial(test_dir = test_dir, test_package = test_package, 36: test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, tryCatch(withCallingHandlers({ env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, eval(code, test_env) desc = desc, load_package = load_package, shuffle = shuffle, new_expectations <- the$test_expectations > starting_expectations error_call = error_call) if (snapshot_skipped) { skip("On CRAN")50: }test_files(test_dir = path, test_paths = test_paths, test_package = package, else if (!new_expectations && skip_on_empty) { reporter = reporter, load_helpers = load_helpers, env = env, skip_empty() stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, } load_package = load_package, parallel = parallel, shuffle = shuffle)}, expectation = handle_expectation, packageNotFoundError = function(e) { 51: if (on_cran()) {test_dir("testthat", package = package, reporter = reporter, skip(paste0("{", e$package, "} is not installed.")) ..., load_package = "installed") } }, snapshot_on_cran = function(cnd) {52: snapshot_skipped <<- TRUEtest_check("missSBM") invokeRestart("muffle_cran_snapshot") }, skip = handle_skip, warning = handle_warning, message = handle_message, An irrecoverable exception occurred. R is aborting now ... 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("missSBM") An irrecoverable exception occurred. R is aborting now ... Saving _problems/test-sbm-bernoulli-without-covariate-44.R [ FAIL 4 | WARN 4 | SKIP 3 | PASS 531 ] ══ Skipped tests (3) ═══════════════════════════════════════════════════════════ • On CRAN (3): 'test-explore-block-count.R:4:3', 'test-missSBM_collection-degenerate.R:80:3', 'test-missSBM_collection-estimate_chain.R:64:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-sbm-bernoulli-with-covariates.R:16:3'): SimpleSBM_fit 'Bernoulli' model, undirected, one covariate ── Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL") Backtrace: ▆ 1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-with-covariates.R:16:3 2. │ └─private$BMobject$estimate() 3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort) 4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort) 5. │ └─base::sapply(...) 6. │ └─base::lapply(X = X, FUN = FUN, ...) 7. │ └─blockmodels (local) FUN(X[[i]], ...) 8. │ └─getRefClass(membership_name)(from_cc = r$membership) 9. │ └─methods::new(`<chr>`, ...) 10. │ ├─methods::initialize(value, ...) 11. │ └─methods::initialize(value, ...) 12. │ └─.Object$initialize(...) 13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL)) 14. └─methods:::.setDummyField(...) ── Error ('test-sbm-bernoulli-with-covariates.R:46:3'): SimpleSBM_fit 'Bernoulli' model, directed, one covariate ── Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL") Backtrace: ▆ 1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-with-covariates.R:46:3 2. │ └─private$BMobject$estimate() 3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort) 4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort) 5. │ └─base::sapply(...) 6. │ └─base::lapply(X = X, FUN = FUN, ...) 7. │ └─blockmodels (local) FUN(X[[i]], ...) 8. │ └─getRefClass(membership_name)(from_cc = r$membership) 9. │ └─methods::new(`<chr>`, ...) 10. │ ├─methods::initialize(value, ...) 11. │ └─methods::initialize(value, ...) 12. │ └─.Object$initialize(...) 13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL)) 14. └─methods:::.setDummyField(...) ── Error ('test-sbm-bernoulli-without-covariate.R:16:3'): SimpleSBM_fit 'Bernoulli' model, undirected, no covariate ── Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL") Backtrace: ▆ 1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-without-covariate.R:16:3 2. │ └─private$BMobject$estimate() 3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort) 4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort) 5. │ └─base::sapply(...) 6. │ └─base::lapply(X = X, FUN = FUN, ...) 7. │ └─blockmodels (local) FUN(X[[i]], ...) 8. │ └─getRefClass(membership_name)(from_cc = r$membership) 9. │ └─methods::new(`<chr>`, ...) 10. │ ├─methods::initialize(value, ...) 11. │ └─methods::initialize(value, ...) 12. │ └─.Object$initialize(...) 13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL)) 14. └─methods:::.setDummyField(...) ── Error ('test-sbm-bernoulli-without-covariate.R:44:3'): SimpleSBM_fit 'Bernoulli' model, directed, no covariate ── Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL") Backtrace: ▆ 1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-without-covariate.R:44:3 2. │ └─private$BMobject$estimate() 3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort) 4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort) 5. │ └─base::sapply(...) 6. │ └─base::lapply(X = X, FUN = FUN, ...) 7. │ └─blockmodels (local) FUN(X[[i]], ...) 8. │ └─getRefClass(membership_name)(from_cc = r$membership) 9. │ └─methods::new(`<chr>`, ...) 10. │ ├─methods::initialize(value, ...) 11. │ └─methods::initialize(value, ...) 12. │ └─.Object$initialize(...) 13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL)) 14. └─methods:::.setDummyField(...) [ FAIL 4 | WARN 4 | SKIP 3 | PASS 531 ] Error: ! Test failures. Execution halted Flavor: r-oldrel-macos-arm64