CRAN Package Check Results for Package missSBM

Last updated on 2026-10-13 09:50:32 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.1.0 86.78 353.63 440.41 OK
r-devel-linux-x86_64-debian-gcc 1.1.0 57.94 253.43 311.37 OK
r-devel-linux-x86_64-fedora-clang 1.1.0 58.00 243.36 301.36 OK
r-devel-linux-x86_64-fedora-gcc 1.1.0 63.00 247.59 310.59 OK
r-devel-windows-x86_64 1.1.0 91.00 450.00 541.00 OK
r-patched-linux-x86_64 1.1.0 82.95 348.35 431.30 OK
r-release-linux-x86_64 1.1.0 74.39 345.64 420.03 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 91.00 364.00 455.00 OK
r-oldrel-macos-arm64 1.1.0 22.00 108.00 130.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 111.00 500.00 611.00 OK

Check Details

Version: 1.1.0
Check: tests
Result: ERROR Running ‘spelling.R’ [0s/0s] Running ‘testthat.R’ [37s/30s] 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")}, 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, parent.frame()) 29: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", { sampler_undirected_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, "bernoulli", FALSE, covarList = covarList_undirected) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(Q) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, covariates = covarList_undirected) cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, clusterInit = cl, covarList = covarList_undirected) 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.8) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), 0.1) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), 0.85) }) 30: eval(code, test_env) 31: eval(code, test_env) 32: withCallingHandlers({ eval(code, test_env) Traceback: new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { 1: skip("On CRAN")dispatcher(membership_name, membership_init$to_cc(), model_name, } .self$network_to_cc(), TRUE) else if (!new_expectations && skip_on_empty) { skip_empty() 2: }FUN(X[[i]], ...) }, expectation = handle_expectation, packageNotFoundError = function(e) { 3: if (on_cran()) {lapply(X = S, FUN = FUN, ...) skip(paste0("{", e$package, "} is not installed.")) 4: }doTryCatch(return(expr), name, parentenv, handler)}, snapshot_on_cran = function(cnd) { 5: snapshot_skipped <<- TRUEtryCatchOne(expr, names, parentenv, handlers[[1L]]) invokeRestart("muffle_cran_snapshot") }, skip = handle_skip, warning = handle_warning, message = handle_message, 6: error = handle_error, interrupt = handle_interrupt)tryCatchList(expr, classes, parentenv, handlers) 33: 7: doTryCatch(return(expr), name, parentenv, handler)tryCatch(expr, error = function(e) { 34: call <- conditionCall(e) if (!is.null(call)) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (identical(call[[1L]], quote(doTryCatch))) 35: call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ")tryCatchList(expr, classes, parentenv, handlers) LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) 36: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], tryCatch(withCallingHandlers({ type = "b") eval(code, test_env) if (w > LONG) new_expectations <- the$test_expectations > starting_expectations prefix <- paste0(prefix, "\n ") if (snapshot_skipped) { } skip("On CRAN") else prefix <- "Error : " 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.")) 8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) } 9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) }, snapshot_on_cran = function(cnd) {10: FUN(X[[i]], ...) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") }, skip = handle_skip, warning = handle_warning, message = handle_message, 11: lapply(seq_len(cores), inner.do) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 37: 12: doWithOneRestart(return(expr), restart)parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)38: withOneRestart(expr, restarts[[1L]])13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 39: verbose = (verbosity > 4))withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env)14: new_expectations <- the$test_expectations > starting_expectations.self$do_with_inits(inits, Q, reinitialization_effort) if (snapshot_skipped) {15: .self$estim_ascend(reinitialization_effort, changing_effort) skip("On CRAN") } else if (!new_expectations && skip_on_empty) {16: private$BMobject$estimate() skip_empty()17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) } }, expectation = handle_expectation, packageNotFoundError = function(e) {18: if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))eval(code, test_env) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")19: }, skip = handle_skip, warning = handle_warning, message = handle_message, eval(code, test_env) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() {20: })withCallingHandlers({ eval(code, test_env)40: new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN")test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new()) } else if (!new_expectations && skip_on_empty) {41: skip_empty() }source_file(path, env = env(env), desc = desc, shuffle = shuffle, }, expectation = handle_expectation, packageNotFoundError = function(e) { error_call = error_call) if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))42: }FUN(X[[i]], ...)}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE43: invokeRestart("muffle_cran_snapshot")lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, }, skip = handle_skip, warning = handle_warning, message = handle_message, error_call = error_call) error = handle_error, interrupt = handle_interrupt) 44: 21: doTryCatch(return(expr), name, parentenv, handler)doTryCatch(return(expr), name, parentenv, handler) 22: 45: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatchOne(expr, names, parentenv, handlers[[1L]]) 23: 46: tryCatchList(expr, classes, parentenv, handlers)tryCatchList(expr, classes, parentenv, handlers) 24: tryCatch(withCallingHandlers({47: eval(code, test_env)tryCatch(code, testthat_abort_reporter = function(cnd) { new_expectations <- the$test_expectations > starting_expectations cat(conditionMessage(cnd), "\n") if (snapshot_skipped) { NULL skip("On CRAN")}) } else if (!new_expectations && skip_on_empty) { skip_empty()48: }with_reporter(reporters$multi, lapply(test_paths, test_one_file, }, expectation = handle_expectation, packageNotFoundError = function(e) { env = env, desc = desc, shuffle = shuffle, error_call = error_call)) if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))49: }test_files_serial(test_dir = test_dir, test_package = test_package, }, snapshot_on_cran = function(cnd) { test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, snapshot_skipped <<- TRUE env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, invokeRestart("muffle_cran_snapshot") desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 25: doWithOneRestart(return(expr), restart)50: test_files(test_dir = path, test_paths = test_paths, test_package = package, 26: reporter = reporter, load_helpers = load_helpers, env = env, withOneRestart(expr, restarts[[1L]]) stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)27: withRestarts(tryCatch(withCallingHandlers({51: eval(code, test_env) new_expectations <- the$test_expectations > starting_expectationstest_dir("testthat", package = package, reporter = reporter, if (snapshot_skipped) { ..., load_package = "installed") skip("On CRAN") } else if (!new_expectations && skip_on_empty) {52: skip_empty()test_check("missSBM") } }, expectation = handle_expectation, packageNotFoundError = function(e) {An irrecoverable exception occurred. R is aborting now ... 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("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", { sampler_undirected_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, "bernoulli", FALSE, covarList = covarList_undirected) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(Q) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, covariates = covarList_undirected) cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, clusterInit = cl, covarList = covarList_undirected) 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.8) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), 0.1) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), 0.85) }) 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-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: 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") } 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, parent.frame()) 29: test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", { sampler_directed_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, "bernoulli", TRUE, covarList = covarList_directed) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(Q) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, covariates = covarList_directed) cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, clusterInit = cl, covarList = covarList_directed) mySBM_missSBM$doVEM(trace = TRUE) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.8) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.05) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), 0.85) }) 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) Traceback: 1: 37: doWithOneRestart(return(expr), restart)dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)38: 2: withOneRestart(expr, restarts[[1L]])FUN(X[[i]], ...) 3: 39: lapply(X = S, FUN = FUN, ...)withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) 4: doTryCatch(return(expr), name, parentenv, handler) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { 5: skip("On CRAN")tryCatchOne(expr, names, parentenv, handlers[[1L]]) } else if (!new_expectations && skip_on_empty) { 6: skip_empty()tryCatchList(expr, classes, parentenv, handlers) } 7: }, expectation = handle_expectation, packageNotFoundError = function(e) {tryCatch(expr, error = function(e) { if (on_cran()) { call <- conditionCall(e) skip(paste0("{", e$package, "} is not installed.")) } if (!is.null(call)) {}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE if (identical(call[[1L]], quote(doTryCatch))) invokeRestart("muffle_cran_snapshot") call <- sys.call(-4L)}, skip = handle_skip, warning = handle_warning, message = handle_message, dcall <- deparse(call, nlines = 1L) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), prefix <- paste("Error in", dcall, ": ") end_test = function() { }) LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]]40: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")test_code(code = exprs, env = env, reporter = get_reporter() %||% if (is.na(w)) StopReporter$new()) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) 41: prefix <- paste0(prefix, "\n ") }source_file(path, env = env(env), desc = desc, shuffle = shuffle, else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") error_call = error_call) .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings())42: }FUN(X[[i]], ...) invisible(structure(msg, class = "try-error", condition = e)) })43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call) 8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)44: doTryCatch(return(expr), name, parentenv, handler) 9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))45: tryCatchOne(expr, names, parentenv, handlers[[1L]])10: FUN(X[[i]], ...)46: tryCatchList(expr, classes, parentenv, handlers)11: lapply(seq_len(cores), inner.do) 47: 12: tryCatch(code, testthat_abort_reporter = function(cnd) {parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, cat(conditionMessage(cnd), "\n") mc.silent = TRUE) NULL })13: 48: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, with_reporter(reporters$multi, lapply(test_paths, test_one_file, verbose = (verbosity > 4)) env = env, desc = desc, shuffle = shuffle, error_call = error_call)) 49: 14: test_files_serial(test_dir = test_dir, test_package = test_package, .self$do_with_inits(inits, Q, reinitialization_effort) test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 15: desc = desc, load_package = load_package, shuffle = shuffle, .self$estim_ascend(reinitialization_effort, changing_effort) error_call = error_call) 16: 50: private$BMobject$estimate()test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, 17: stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) load_package = load_package, parallel = parallel, shuffle = shuffle) 18: eval(code, test_env)51: test_dir("testthat", package = package, reporter = reporter, 19: ..., load_package = "installed")eval(code, test_env) 52: 20: test_check("missSBM")withCallingHandlers({ eval(code, test_env)An irrecoverable exception occurred. R is aborting now ... 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, parent.frame()) 29: test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", { sampler_directed_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, "bernoulli", TRUE, covarList = covarList_directed) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(Q) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, covariates = covarList_directed) cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, clusterInit = cl, covarList = covarList_directed) mySBM_missSBM$doVEM(trace = TRUE) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.8) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.05) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), 0.85) }) 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-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))}) Traceback: 1: dispatcher(membership_name, membership_init$to_cc(), model_name, 8: .self$network_to_cc(), TRUE)try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 9: 2: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))FUN(X[[i]], ...) 10: FUN(X[[i]], ...) 3: 11: lapply(X = S, FUN = FUN, ...)lapply(seq_len(cores), inner.do) 4: 12: doTryCatch(return(expr), name, parentenv, handler)parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]])13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 6: verbose = (verbosity > 4))tryCatchList(expr, classes, parentenv, handlers) 14: 7: .self$do_with_inits(inits, Q, reinitialization_effort)tryCatch(expr, error = function(e) { call <- conditionCall(e)15: if (!is.null(call)) {.self$estim_ascend(reinitialization_effort, changing_effort) if (identical(call[[1L]], quote(doTryCatch))) 16: call <- sys.call(-4L)private$BMobject$estimate() dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L17: sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 18: eval(code, test_env) type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ")19: }eval(code, test_env) else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n")20: .Internal(seterrmessage(msg[1L]))withCallingHandlers({ if (!silent && isTRUE(getOption("show.error.messages"))) { eval(code, test_env) cat(msg, file = outFile) new_expectations <- the$test_expectations > starting_expectations .Internal(printDeferredWarnings()) if (snapshot_skipped) { skip("On CRAN") } } invisible(structure(msg, class = "try-error", condition = e)) else if (!new_expectations && skip_on_empty) {}) skip_empty() 8: }try(lapply(X = S, FUN = FUN, ...), silent = TRUE)}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { 9: skip(paste0("{", e$package, "} is not installed.")) }sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE10: invokeRestart("muffle_cran_snapshot")FUN(X[[i]], ...)}, skip = handle_skip, warning = handle_warning, message = handle_message, 11: error = handle_error, interrupt = handle_interrupt)lapply(seq_len(cores), inner.do) 21: doTryCatch(return(expr), name, parentenv, handler)12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, 22: mc.silent = TRUE)tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: 23: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, tryCatchList(expr, classes, parentenv, handlers) verbose = (verbosity > 4)) 24: 14: tryCatch(withCallingHandlers({.self$do_with_inits(inits, Q, reinitialization_effort) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations15: if (snapshot_skipped) {.self$estim_ascend(reinitialization_effort, changing_effort) skip("On CRAN") }16: else if (!new_expectations && skip_on_empty) {private$BMobject$estimate() skip_empty() }17: }, expectation = handle_expectation, packageNotFoundError = function(e) {mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))18: eval(code, test_env) } }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE19: invokeRestart("muffle_cran_snapshot")eval(code, test_env)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)20: withCallingHandlers({25: eval(code, test_env)doWithOneRestart(return(expr), restart) new_expectations <- the$test_expectations > starting_expectations 26: withOneRestart(expr, restarts[[1L]]) if (snapshot_skipped) { skip("On CRAN")27: }withRestarts(tryCatch(withCallingHandlers({ else if (!new_expectations && skip_on_empty) { skip_empty() eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip("On CRAN") skip(paste0("{", e$package, "} is not installed.")) } else if (!new_expectations && skip_on_empty) { } skip_empty()}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, expectation = handle_expectation, packageNotFoundError = function(e) { invokeRestart("muffle_cran_snapshot") if (on_cran()) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip(paste0("{", e$package, "} is not installed.")) error = handle_error, interrupt = handle_interrupt) }}, snapshot_on_cran = function(cnd) {21: snapshot_skipped <<- TRUEdoTryCatch(return(expr), name, parentenv, handler) invokeRestart("muffle_cran_snapshot") }, skip = handle_skip, warning = handle_warning, message = handle_message, 22: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), tryCatchOne(expr, names, parentenv, handlers[[1L]]) end_test = function() { 23: })tryCatchList(expr, classes, parentenv, handlers) 28: 24: test_code(code, parent.frame()) tryCatch(withCallingHandlers({29: eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", skip("On CRAN") } { else if (!new_expectations && skip_on_empty) { sampler_undirected_nocov$rNetwork(store = TRUE) skip_empty() mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, } "bernoulli", FALSE)}, expectation = handle_expectation, packageNotFoundError = function(e) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, if (on_cran()) { plot = FALSE)) skip(paste0("{", e$package, "} is not installed.")) mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) } cl <- net$clustering(3)[[1]]}, snapshot_on_cran = function(cnd) { mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, snapshot_skipped <<- TRUE clusterInit = cl) mySBM_missSBM$doVEM() invokeRestart("muffle_cran_snapshot") expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), }, skip = handle_skip, warning = handle_warning, message = handle_message, 0.05) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 0.95) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 25: 0.01)doWithOneRestart(return(expr), restart) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), 0.05) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), 26: 0.95)withOneRestart(expr, restarts[[1L]]) }) 30: 27: eval(code, test_env)withRestarts(tryCatch(withCallingHandlers({ 31: eval(code, test_env)eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {32: skip("On CRAN")withCallingHandlers({ } 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) {}, 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, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }, snapshot_on_cran = function(cnd) { end_test = function() { }) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, 28: error = handle_error, interrupt = handle_interrupt)test_code(code, parent.frame()) 33: 29: doTryCatch(return(expr), name, parentenv, handler)test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", { sampler_undirected_nocov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, "bernoulli", FALSE)34: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, tryCatchOne(expr, names, parentenv, handlers[[1L]]) plot = FALSE)) mySBM_sbm$setModel(3)35: net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData)tryCatchList(expr, classes, parentenv, handlers) cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, clusterInit = cl)36: mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), tryCatch(withCallingHandlers({ 0.05) eval(code, test_env) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), new_expectations <- the$test_expectations > starting_expectations 0.95) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), if (snapshot_skipped) { 0.01) skip("On CRAN") expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), } 0.05) else if (!new_expectations && skip_on_empty) { expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), skip_empty() 0.95) } })}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))30: }eval(code, test_env)}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE31: invokeRestart("muffle_cran_snapshot")eval(code, test_env)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)32: 37: withCallingHandlers({doWithOneRestart(return(expr), restart) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations38: withOneRestart(expr, restarts[[1L]]) if (snapshot_skipped) { skip("On CRAN")39: }withRestarts(tryCatch(withCallingHandlers({ else if (!new_expectations && skip_on_empty) { eval(code, test_env) skip_empty() new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { } skip("On CRAN")}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { } skip(paste0("{", e$package, "} is not installed.")) else if (!new_expectations && skip_on_empty) { } skip_empty() }}, snapshot_on_cran = function(cnd) {}, expectation = handle_expectation, packageNotFoundError = function(e) { snapshot_skipped <<- TRUE if (on_cran()) { invokeRestart("muffle_cran_snapshot") skip(paste0("{", e$package, "} is not installed."))}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt)}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE33: doTryCatch(return(expr), name, parentenv, handler) invokeRestart("muffle_cran_snapshot") }, skip = handle_skip, warning = handle_warning, message = handle_message, 34: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() {tryCatchOne(expr, names, parentenv, handlers[[1L]]) }) 35: 40: test_code(code = exprs, env = env, reporter = get_reporter() %||% tryCatchList(expr, classes, parentenv, handlers) StopReporter$new()) 41: 36: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)tryCatch(withCallingHandlers({ eval(code, test_env)42: new_expectations <- the$test_expectations > starting_expectationsFUN(X[[i]], ...) if (snapshot_skipped) {43: skip("On CRAN")lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, } error_call = error_call) else if (!new_expectations && skip_on_empty) { skip_empty()44: }doTryCatch(return(expr), name, parentenv, handler)}, expectation = handle_expectation, packageNotFoundError = function(e) { 45: if (on_cran()) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) skip(paste0("{", e$package, "} is not installed.")) }46: }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUEtryCatchList(expr, classes, parentenv, handlers) invokeRestart("muffle_cran_snapshot") }, skip = handle_skip, warning = handle_warning, message = handle_message, 47: error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 37: tryCatch(code, testthat_abort_reporter = function(cnd) {doWithOneRestart(return(expr), restart) cat(conditionMessage(cnd), "\n") NULL38: })withOneRestart(expr, restarts[[1L]]) 48: 39: with_reporter(reporters$multi, lapply(test_paths, test_one_file, withRestarts(tryCatch(withCallingHandlers({ env = env, desc = desc, shuffle = shuffle, error_call = error_call)) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations49: if (snapshot_skipped) {test_files_serial(test_dir = test_dir, test_package = test_package, skip("On CRAN") test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, } env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, else if (!new_expectations && skip_on_empty) { desc = desc, load_package = load_package, shuffle = shuffle, skip_empty() error_call = error_call) }50: }, expectation = handle_expectation, packageNotFoundError = function(e) {test_files(test_dir = path, test_paths = test_paths, test_package = package, if (on_cran()) { reporter = reporter, load_helpers = load_helpers, env = env, skip(paste0("{", e$package, "} is not installed.")) stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle) } }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE51: invokeRestart("muffle_cran_snapshot")test_dir("testthat", package = package, reporter = reporter, }, skip = handle_skip, warning = handle_warning, message = handle_message, ..., load_package = "installed") error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() {52: }) test_check("missSBM")40: test_code(code = exprs, env = env, reporter = get_reporter() %||% An irrecoverable exception occurred. R is aborting now ... 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) 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, parent.frame()) 29: test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", { sampler_directed_nocov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, "bernoulli", TRUE) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, clusterInit = cl) mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) 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_directed_nocov$connectParam$mean), 0.1) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), 0.2) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_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), Traceback: 1: end_test = function() {dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE) }) 2: FUN(X[[i]], ...) 40: 3: test_code(code = exprs, env = env, reporter = get_reporter() %||% lapply(X = S, FUN = FUN, ...) StopReporter$new()) 41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call) 4: doTryCatch(return(expr), name, parentenv, handler)42: FUN(X[[i]], ...) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]])43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, 6: error_call = error_call)tryCatchList(expr, classes, parentenv, handlers) 44: doTryCatch(return(expr), name, parentenv, handler) 7: 45: tryCatch(expr, error = function(e) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) call <- conditionCall(e) if (!is.null(call)) {46: if (identical(call[[1L]], quote(doTryCatch))) tryCatchList(expr, classes, parentenv, handlers) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L)47: prefix <- paste("Error in", dcall, ": ")tryCatch(code, testthat_abort_reporter = function(cnd) { LONG <- 75L cat(conditionMessage(cnd), "\n") sm <- strsplit(conditionMessage(e), "\n")[[1L]] NULL w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")}) if (is.na(w)) 48: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], with_reporter(reporters$multi, lapply(test_paths, test_one_file, type = "b") env = env, desc = desc, shuffle = shuffle, error_call = error_call)) if (w > LONG) 49: prefix <- paste0(prefix, "\n ")test_files_serial(test_dir = test_dir, test_package = test_package, } test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, else prefix <- "Error : " env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, msg <- paste0(prefix, conditionMessage(e), "\n") desc = desc, load_package = load_package, shuffle = shuffle, .Internal(seterrmessage(msg[1L])) error_call = error_call) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings())50: }test_files(test_dir = path, test_paths = test_paths, test_package = package, invisible(structure(msg, class = "try-error", condition = e)) 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) 8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)51: test_dir("testthat", package = package, reporter = reporter, 9: ..., load_package = "installed")sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 52: 10: test_check("missSBM")FUN(X[[i]], ...) An irrecoverable exception occurred. R is aborting now ... 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") } 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, parent.frame()) 29: test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", { sampler_directed_nocov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, "bernoulli", TRUE) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, clusterInit = cl) mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) 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_directed_nocov$connectParam$mean), 0.1) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), 0.2) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_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-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