CRAN Package Check Results for Package missSBM

Last updated on 2026-11-23 22:51:09 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.1.0 79.64 381.25 460.89 OK
r-devel-linux-x86_64-debian-gcc 1.1.0 56.51 261.97 318.48 OK
r-devel-linux-x86_64-fedora-clang 1.1.0 66.00 274.28 340.28 OK
r-devel-linux-x86_64-fedora-gcc 1.1.0 64.00 267.27 331.27 OK
r-devel-windows-x86_64 1.1.0 90.00 451.00 541.00 OK
r-patched-linux-x86_64 1.1.0 88.83 361.66 450.49 OK
r-release-linux-x86_64 1.1.0 82.38 369.49 451.87 OK
r-release-macos-arm64 1.1.0 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 375.00 468.00 OK
r-oldrel-macos-arm64 1.1.0 20.00 83.00 103.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 116.00 534.00 650.00 OK

Check Details

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