CRAN Package Check Results for Package missSBM

Last updated on 2026-10-17 02:52:47 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.1.0 88.36 352.66 441.02 OK
r-devel-linux-x86_64-debian-gcc 1.1.0 58.03 240.79 298.82 OK
r-devel-linux-x86_64-fedora-clang 1.1.0 57.00 247.35 304.35 OK
r-devel-linux-x86_64-fedora-gcc 1.1.0 63.00 247.59 310.59 OK
r-devel-windows-x86_64 1.1.0 95.00 449.00 544.00 OK
r-patched-linux-x86_64 1.1.0 85.58 342.08 427.66 OK
r-release-linux-x86_64 1.1.0 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 98.00 358.00 456.00 OK
r-oldrel-macos-arm64 1.1.0 19.00 91.00 110.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 119.00 528.00 647.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)) Traceback: 1: dispatcher(membership_name, membership_init$to_cc(), model_name, 14: .self$do_with_inits(inits, Q, reinitialization_effort) .self$network_to_cc(), TRUE) 15: 2: .self$estim_ascend(reinitialization_effort, changing_effort)FUN(X[[i]], ...) 16: 3: private$BMobject$estimate()lapply(X = S, FUN = FUN, ...) 17: 4: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) doTryCatch(return(expr), name, parentenv, handler)18: eval(code, test_env) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]])19: 6: eval(code, test_env) tryCatchList(expr, classes, parentenv, handlers)20: withCallingHandlers({ eval(code, test_env) 7: tryCatch(expr, error = function(e) { new_expectations <- the$test_expectations > starting_expectations call <- conditionCall(e) if (!is.null(call)) { if (snapshot_skipped) { if (identical(call[[1L]], quote(doTryCatch))) skip("On CRAN") call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) } else if (!new_expectations && skip_on_empty) { prefix <- paste("Error in", dcall, ": ") skip_empty() LONG <- 75L } sm <- strsplit(conditionMessage(e), "\n")[[1L]]}, expectation = handle_expectation, packageNotFoundError = function(e) { w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (on_cran()) { if (is.na(w)) skip(paste0("{", e$package, "} is not installed.")) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], } type = "b")}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE if (w > LONG) prefix <- paste0(prefix, "\n ") invokeRestart("muffle_cran_snapshot") } else prefix <- "Error : "}, skip = handle_skip, warning = handle_warning, message = handle_message, msg <- paste0(prefix, conditionMessage(e), "\n") error = handle_error, interrupt = handle_interrupt) .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile)21: .Internal(printDeferredWarnings())doTryCatch(return(expr), name, parentenv, handler) } invisible(structure(msg, class = "try-error", condition = e))22: })tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)23: tryCatchList(expr, classes, parentenv, handlers) 9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))24: tryCatch(withCallingHandlers({ eval(code, test_env)10: new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {FUN(X[[i]], ...) skip("On CRAN") }11: else if (!new_expectations && skip_on_empty) {lapply(seq_len(cores), inner.do) skip_empty() } 12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, }, expectation = handle_expectation, packageNotFoundError = function(e) { 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, snapshot_skipped <<- TRUE verbose = (verbosity > 4)) invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, 14: .self$do_with_inits(inits, Q, reinitialization_effort) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 15: 25: .self$estim_ascend(reinitialization_effort, changing_effort)doWithOneRestart(return(expr), restart) 16: 26: private$BMobject$estimate()withOneRestart(expr, restarts[[1L]]) 17: 27: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations18: if (snapshot_skipped) {eval(code, test_env) skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty()19: }eval(code, test_env) }, expectation = handle_expectation, packageNotFoundError = function(e) {20: if (on_cran()) {withCallingHandlers({ skip(paste0("{", e$package, "} is not installed.")) eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE if (snapshot_skipped) { invokeRestart("muffle_cran_snapshot") skip("On CRAN")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), } end_test = function() { else if (!new_expectations && skip_on_empty) { skip_empty() }) }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {28: skip(paste0("{", e$package, "} is not installed."))test_code(code, parent.frame()) } }, snapshot_on_cran = function(cnd) {29: snapshot_skipped <<- TRUEtest_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", invokeRestart("muffle_cran_snapshot") {}, skip = handle_skip, warning = handle_warning, message = handle_message, sampler_undirected_cov$rNetwork(store = TRUE) error = handle_error, interrupt = handle_interrupt) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, "bernoulli", FALSE, covarList = covarList_undirected) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, 21: doTryCatch(return(expr), name, parentenv, handler) plot = FALSE)) mySBM_sbm$setModel(Q)22: net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, tryCatchOne(expr, names, parentenv, handlers[[1L]]) covariates = covarList_undirected) cls <- net$clustering(1:(2 * Q))23: cl <- cls[[Q]]tryCatchList(expr, classes, parentenv, handlers) mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, clusterInit = cl, covarList = covarList_undirected)24: mySBM_missSBM$doVEM()tryCatch(withCallingHandlers({ expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations 0.05) if (snapshot_skipped) { skip("On CRAN") expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), } 0.8) else if (!new_expectations && skip_on_empty) { skip_empty() expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01) } expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), }, expectation = handle_expectation, packageNotFoundError = function(e) { 0.1) if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), }}, snapshot_on_cran = function(cnd) { 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), snapshot_skipped <<- TRUE 0.85) invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, }) 30: error = handle_error, interrupt = handle_interrupt), error = handle_fatal) eval(code, test_env)25: doWithOneRestart(return(expr), restart) 31: 26: eval(code, test_env)withOneRestart(expr, restarts[[1L]]) 32: withCallingHandlers({27: eval(code, test_env)withRestarts(tryCatch(withCallingHandlers({ new_expectations <- the$test_expectations > starting_expectations eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { if (snapshot_skipped) { skip("On CRAN") skip("On CRAN") } } else if (!new_expectations && skip_on_empty) { else if (!new_expectations && skip_on_empty) { skip_empty() skip_empty() } }}, expectation = handle_expectation, packageNotFoundError = function(e) {}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) skip(paste0("{", e$package, "} is not installed.")) } }}, snapshot_on_cran = function(cnd) {}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }, skip = handle_skip, warning = handle_warning, message = handle_message, end_test = function() { }) error = handle_error, interrupt = handle_interrupt) 28: 33: test_code(code, parent.frame())doTryCatch(return(expr), name, parentenv, handler) 29: 34: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", tryCatchOne(expr, names, parentenv, handlers[[1L]]) { sampler_undirected_cov$rNetwork(store = TRUE)35: tryCatchList(expr, classes, parentenv, handlers) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, "bernoulli", FALSE, covarList = covarList_undirected) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))36: tryCatch(withCallingHandlers({ mySBM_sbm$setModel(Q) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, eval(code, test_env) covariates = covarList_undirected) new_expectations <- the$test_expectations > starting_expectations cls <- net$clustering(1:(2 * Q)) if (snapshot_skipped) { cl <- cls[[Q]] skip("On CRAN") mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, } clusterInit = cl, covarList = covarList_undirected) else if (!new_expectations && skip_on_empty) { skip_empty() mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), } 0.05)}, expectation = handle_expectation, packageNotFoundError = function(e) { expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) 0.8) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01) invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), 0.1) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), 37: 0.1)doWithOneRestart(return(expr), restart) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), 38: 0.85)withOneRestart(expr, restarts[[1L]]) }) 30: 39: eval(code, test_env)withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations31: if (snapshot_skipped) {eval(code, test_env) 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) { skip("On CRAN") } if (on_cran()) { else if (!new_expectations && skip_on_empty) { skip(paste0("{", e$package, "} is not installed.")) skip_empty() } }}, snapshot_on_cran = function(cnd) {}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { 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) 40: test_code(code = exprs, env = env, reporter = get_reporter() %||% 33: StopReporter$new())doTryCatch(return(expr), name, parentenv, handler) 41: 34: source_file(path, env = env(env), desc = desc, shuffle = shuffle, tryCatchOne(expr, names, parentenv, handlers[[1L]]) error_call = error_call) 35: 42: tryCatchList(expr, classes, parentenv, handlers)FUN(X[[i]], ...) 36: 43: tryCatch(withCallingHandlers({lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, eval(code, test_env) error_call = error_call) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {44: skip("On CRAN")doTryCatch(return(expr), name, parentenv, handler) } else if (!new_expectations && skip_on_empty) { skip_empty()45: }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))46: }tryCatchList(expr, classes, parentenv, handlers)}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE47: invokeRestart("muffle_cran_snapshot")tryCatch(code, testthat_abort_reporter = function(cnd) {}, skip = handle_skip, warning = handle_warning, message = handle_message, cat(conditionMessage(cnd), "\n") error = handle_error, interrupt = handle_interrupt), error = handle_fatal) NULL })37: doWithOneRestart(return(expr), restart)48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, 38: env = env, desc = desc, shuffle = shuffle, error_call = error_call))withOneRestart(expr, restarts[[1L]]) 49: 39: test_files_serial(test_dir = test_dir, test_package = test_package, withRestarts(tryCatch(withCallingHandlers({ test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, eval(code, test_env) env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, new_expectations <- the$test_expectations > starting_expectations desc = desc, load_package = load_package, shuffle = shuffle, if (snapshot_skipped) { error_call = error_call) skip("On CRAN") }50: else if (!new_expectations && skip_on_empty) {test_files(test_dir = path, test_paths = test_paths, test_package = package, skip_empty() reporter = reporter, load_helpers = load_helpers, env = env, } stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, }, expectation = handle_expectation, packageNotFoundError = function(e) { load_package = load_package, parallel = parallel, shuffle = shuffle) if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))51: }test_dir("testthat", package = package, reporter = reporter, }, snapshot_on_cran = function(cnd) { ..., load_package = "installed") snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")52: }, skip = handle_skip, warning = handle_warning, message = handle_message, test_check("missSBM") error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() {An irrecoverable exception occurred. R is aborting now ... }) 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)) Traceback: 1: })dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE) 8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 2: FUN(X[[i]], ...) 9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 3: 10: lapply(X = S, FUN = FUN, ...)FUN(X[[i]], ...) 4: doTryCatch(return(expr), name, parentenv, handler) 11: 5: lapply(seq_len(cores), inner.do)tryCatchOne(expr, names, parentenv, handlers[[1L]]) 12: 6: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, tryCatchList(expr, classes, parentenv, handlers) mc.silent = TRUE) 7: 13: tryCatch(expr, error = function(e) {parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, call <- conditionCall(e) verbose = (verbosity > 4)) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) 14: call <- sys.call(-4L).self$do_with_inits(inits, Q, reinitialization_effort) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ")15: LONG <- 75L.self$estim_ascend(reinitialization_effort, changing_effort) sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")16: if (is.na(w)) private$BMobject$estimate() w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b")17: if (w > LONG) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) prefix <- paste0(prefix, "\n ") }18: else prefix <- "Error : "eval(code, test_env) msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L]))19: if (!silent && isTRUE(getOption("show.error.messages"))) {eval(code, test_env) cat(msg, file = outFile) .Internal(printDeferredWarnings())20: }withCallingHandlers({ invisible(structure(msg, class = "try-error", condition = e))}) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations 8: if (snapshot_skipped) {try(lapply(X = S, FUN = FUN, ...), silent = TRUE) skip("On CRAN") } 9: else if (!new_expectations && skip_on_empty) {sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { 10: if (on_cran()) {FUN(X[[i]], ...) skip(paste0("{", e$package, "} is not installed."))11: }lapply(seq_len(cores), inner.do)}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE12: invokeRestart("muffle_cran_snapshot")parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, }, skip = handle_skip, warning = handle_warning, message = handle_message, mc.silent = TRUE) error = handle_error, interrupt = handle_interrupt) 13: 21: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, doTryCatch(return(expr), name, parentenv, handler) verbose = (verbosity > 4)) 14: 22: tryCatchOne(expr, names, parentenv, handlers[[1L]]).self$do_with_inits(inits, Q, reinitialization_effort) 23: 15: tryCatchList(expr, classes, parentenv, handlers).self$estim_ascend(reinitialization_effort, changing_effort) 16: 24: private$BMobject$estimate()tryCatch(withCallingHandlers({ eval(code, test_env)17: new_expectations <- the$test_expectations > starting_expectationsmySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) if (snapshot_skipped) { skip("On CRAN")18: }eval(code, test_env) else if (!new_expectations && skip_on_empty) { skip_empty()19: }eval(code, test_env)}, expectation = handle_expectation, packageNotFoundError = function(e) { 20: if (on_cran()) {withCallingHandlers({ skip(paste0("{", e$package, "} is not installed.")) eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, snapshot_on_cran = function(cnd) { if (snapshot_skipped) { snapshot_skipped <<- TRUE skip("On CRAN") invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, else if (!new_expectations && skip_on_empty) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) skip_empty() }25: }, expectation = handle_expectation, packageNotFoundError = function(e) {doWithOneRestart(return(expr), restart) if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))26: }withOneRestart(expr, restarts[[1L]])}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE27: invokeRestart("muffle_cran_snapshot")withRestarts(tryCatch(withCallingHandlers({}, skip = handle_skip, warning = handle_warning, message = handle_message, eval(code, test_env) error = handle_error, interrupt = handle_interrupt) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {21: doTryCatch(return(expr), name, parentenv, handler) skip("On CRAN") }22: else if (!new_expectations && skip_on_empty) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) skip_empty() } }, expectation = handle_expectation, packageNotFoundError = function(e) {23: if (on_cran()) {tryCatchList(expr, classes, parentenv, handlers) skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")24: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatch(withCallingHandlers({ error = handle_error, interrupt = handle_interrupt), error = handle_fatal), eval(code, test_env) end_test = function() { new_expectations <- the$test_expectations > starting_expectations }) if (snapshot_skipped) { skip("On CRAN")28: test_code(code, parent.frame()) } else if (!new_expectations && skip_on_empty) { skip_empty()29: }test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", }, expectation = handle_expectation, packageNotFoundError = function(e) { { if (on_cran()) { sampler_directed_cov$rNetwork(store = TRUE) skip(paste0("{", e$package, "} is not installed.")) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, } "bernoulli", TRUE, covarList = covarList_directed)}, snapshot_on_cran = function(cnd) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, snapshot_skipped <<- TRUE plot = FALSE)) invokeRestart("muffle_cran_snapshot") mySBM_sbm$setModel(Q)}, skip = handle_skip, warning = handle_warning, message = handle_message, net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, covariates = covarList_directed) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]]25: mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, doWithOneRestart(return(expr), restart) clusterInit = cl, covarList = covarList_directed) mySBM_missSBM$doVEM(trace = TRUE)26: expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), withOneRestart(expr, restarts[[1L]]) 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 27: 0.8)withRestarts(tryCatch(withCallingHandlers({ expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), eval(code, test_env) 0.05) new_expectations <- the$test_expectations > starting_expectations expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), if (snapshot_skipped) { 0.1) skip("On CRAN") expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), } 0.85) else if (!new_expectations && skip_on_empty) { }) skip_empty() }30: }, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {eval(code, test_env) skip(paste0("{", e$package, "} is not installed.")) 31: }eval(code, test_env)}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE32: invokeRestart("muffle_cran_snapshot")withCallingHandlers({}, 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() { new_expectations <- the$test_expectations > starting_expectations }) if (snapshot_skipped) { skip("On CRAN") }28: else if (!new_expectations && skip_on_empty) {test_code(code, parent.frame()) skip_empty() }29: }, expectation = handle_expectation, packageNotFoundError = function(e) {test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) } { sampler_directed_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE "bernoulli", TRUE, covarList = covarList_directed) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, plot = FALSE)) mySBM_sbm$setModel(Q) error = handle_error, interrupt = handle_interrupt) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, covariates = covarList_directed)33: doTryCatch(return(expr), name, parentenv, handler) cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]] 34: mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, tryCatchOne(expr, names, parentenv, handlers[[1L]]) clusterInit = cl, covarList = covarList_directed) mySBM_missSBM$doVEM(trace = TRUE)35: expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), tryCatchList(expr, classes, parentenv, handlers) 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 36: 0.8)tryCatch(withCallingHandlers({ expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), eval(code, test_env) 0.05) new_expectations <- the$test_expectations > starting_expectations expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), if (snapshot_skipped) { 0.1) skip("On CRAN") expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), } 0.85) else if (!new_expectations && skip_on_empty) { }) skip_empty() }30: }, expectation = handle_expectation, packageNotFoundError = function(e) {eval(code, test_env) if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))31: }eval(code, test_env)}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE32: withCallingHandlers({ 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) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {37: skip("On CRAN")doWithOneRestart(return(expr), restart) } else if (!new_expectations && skip_on_empty) {38: skip_empty()withOneRestart(expr, restarts[[1L]]) } }, expectation = handle_expectation, packageNotFoundError = function(e) {39: if (on_cran()) {withRestarts(tryCatch(withCallingHandlers({ skip(paste0("{", e$package, "} is not installed.")) eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, snapshot_on_cran = function(cnd) { if (snapshot_skipped) { snapshot_skipped <<- TRUE skip("On CRAN") invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, else if (!new_expectations && skip_on_empty) { error = handle_error, interrupt = handle_interrupt) skip_empty() }33: }, expectation = handle_expectation, packageNotFoundError = function(e) {doTryCatch(return(expr), name, parentenv, handler) if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))34: }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE35: invokeRestart("muffle_cran_snapshot")tryCatchList(expr, classes, parentenv, handlers)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 36: end_test = function() {tryCatch(withCallingHandlers({ }) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations40: if (snapshot_skipped) {test_code(code = exprs, env = env, reporter = get_reporter() %||% skip("On CRAN") StopReporter$new()) } 41: else if (!new_expectations && skip_on_empty) {source_file(path, env = env(env), desc = desc, shuffle = shuffle, skip_empty() error_call = error_call) } 42: }, expectation = handle_expectation, packageNotFoundError = function(e) {FUN(X[[i]], ...) if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))43: }lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") error_call = error_call)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)44: doTryCatch(return(expr), name, parentenv, handler)37: doWithOneRestart(return(expr), restart)45: tryCatchOne(expr, names, parentenv, handlers[[1L]])38: withOneRestart(expr, restarts[[1L]])46: tryCatchList(expr, classes, parentenv, handlers)39: withRestarts(tryCatch(withCallingHandlers({47: eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {tryCatch(code, testthat_abort_reporter = function(cnd) { skip("On CRAN") cat(conditionMessage(cnd), "\n") NULL }}) 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, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, }, snapshot_on_cran = function(cnd) { env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, snapshot_skipped <<- TRUE desc = desc, load_package = load_package, shuffle = shuffle, invokeRestart("muffle_cran_snapshot") error_call = error_call)}, skip = handle_skip, warning = handle_warning, message = handle_message, 50: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), test_files(test_dir = path, test_paths = test_paths, test_package = package, end_test = function() { 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)40: test_code(code = exprs, env = env, reporter = get_reporter() %||% 51: StopReporter$new())test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, 52: error_call = error_call)test_check("missSBM") 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-with-covariates-46.R *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE) 2: FUN(X[[i]], ...) 3: lapply(X = S, FUN = FUN, ...) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 10: FUN(X[[i]], ...) 11: lapply(seq_len(cores), inner.do) 12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE) 13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4)) 14: .self$do_with_inits(inits, Q, reinitialization_effort) 15: .self$estim_ascend(reinitialization_effort, changing_effort) 16: private$BMobject$estimate() 17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) 18: eval(code, test_env) 19: eval(code, test_env) 20: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt) 21: Traceback: doTryCatch(return(expr), name, parentenv, handler) 1: 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE) 23: 2: tryCatchList(expr, classes, parentenv, handlers)FUN(X[[i]], ...) 24: 3: tryCatch(withCallingHandlers({lapply(X = S, FUN = FUN, ...) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations 4: if (snapshot_skipped) {doTryCatch(return(expr), name, parentenv, handler) skip("On CRAN") } 5: else if (!new_expectations && skip_on_empty) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) skip_empty() } 6: }, expectation = handle_expectation, packageNotFoundError = function(e) {tryCatchList(expr, classes, parentenv, handlers) if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) 7: }tryCatch(expr, error = function(e) {}, snapshot_on_cran = function(cnd) { call <- conditionCall(e) snapshot_skipped <<- TRUE if (!is.null(call)) { invokeRestart("muffle_cran_snapshot") if (identical(call[[1L]], quote(doTryCatch))) }, skip = handle_skip, warning = handle_warning, message = handle_message, call <- sys.call(-4L) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ")25: LONG <- 75LdoWithOneRestart(return(expr), restart) sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")26: if (is.na(w)) withOneRestart(expr, restarts[[1L]]) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b")27: if (w > LONG) withRestarts(tryCatch(withCallingHandlers({ prefix <- paste0(prefix, "\n ") eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations else prefix <- "Error : " if (snapshot_skipped) { msg <- paste0(prefix, conditionMessage(e), "\n") skip("On CRAN") .Internal(seterrmessage(msg[1L])) } if (!silent && isTRUE(getOption("show.error.messages"))) { else if (!new_expectations && skip_on_empty) { cat(msg, file = outFile) skip_empty() .Internal(printDeferredWarnings()) } }}, expectation = handle_expectation, packageNotFoundError = function(e) { invisible(structure(msg, class = "try-error", condition = e)) if (on_cran()) {}) skip(paste0("{", e$package, "} is not installed.")) } 8: }, snapshot_on_cran = function(cnd) {try(lapply(X = S, FUN = FUN, ...), silent = TRUE) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") 9: }, skip = handle_skip, warning = handle_warning, message = handle_message, sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() {10: })FUN(X[[i]], ...) 28: 11: test_code(code, parent.frame())lapply(seq_len(cores), inner.do) 29: 12: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, { mc.silent = TRUE) sampler_undirected_nocov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, 13: "bernoulli", FALSE)parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, mySBM_sbm$optimize(estimOptions = list(verbosity = 0, verbose = (verbosity > 4)) plot = FALSE)) mySBM_sbm$setModel(3)14: net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData).self$do_with_inits(inits, Q, reinitialization_effort) cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, 15: clusterInit = cl).self$estim_ascend(reinitialization_effort, changing_effort) mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 16: 0.05)private$BMobject$estimate() expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.95)17: expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), 0.05)18: expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), eval(code, test_env) 0.95) })19: eval(code, test_env)30: eval(code, test_env)20: 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) else if (!new_expectations && skip_on_empty) { new_expectations <- the$test_expectations > starting_expectations skip_empty() if (snapshot_skipped) { } skip("On CRAN")}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) { else if (!new_expectations && skip_on_empty) { skip(paste0("{", e$package, "} is not installed.")) skip_empty() } }}, snapshot_on_cran = function(cnd) {}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) snapshot_skipped <<- TRUE }}, snapshot_on_cran = function(cnd) { invokeRestart("muffle_cran_snapshot")}, 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, error = handle_error, interrupt = handle_interrupt)21: doTryCatch(return(expr), name, parentenv, handler)33: doTryCatch(return(expr), name, parentenv, handler)22: tryCatchOne(expr, names, parentenv, handlers[[1L]])34: tryCatchOne(expr, names, parentenv, handlers[[1L]])23: tryCatchList(expr, classes, parentenv, handlers) 24: tryCatch(withCallingHandlers({35: eval(code, test_env)tryCatchList(expr, classes, parentenv, handlers) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {36: skip("On CRAN")tryCatch(withCallingHandlers({ } eval(code, test_env) else if (!new_expectations && skip_on_empty) { new_expectations <- the$test_expectations > starting_expectations skip_empty() if (snapshot_skipped) { } skip("On CRAN")}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) { else if (!new_expectations && skip_on_empty) { skip(paste0("{", e$package, "} is not installed.")) 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, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))25: }doWithOneRestart(return(expr), restart) }, snapshot_on_cran = function(cnd) {26: snapshot_skipped <<- TRUEwithOneRestart(expr, restarts[[1L]]) invokeRestart("muffle_cran_snapshot") 27: }, skip = handle_skip, warning = handle_warning, message = handle_message, withRestarts(tryCatch(withCallingHandlers({ error = handle_error, interrupt = handle_interrupt), error = handle_fatal) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations37: if (snapshot_skipped) {doWithOneRestart(return(expr), restart) skip("On CRAN") }38: else if (!new_expectations && skip_on_empty) {withOneRestart(expr, restarts[[1L]]) skip_empty() }39: }, expectation = handle_expectation, packageNotFoundError = function(e) {withRestarts(tryCatch(withCallingHandlers({ if (on_cran()) { eval(code, test_env) skip(paste0("{", e$package, "} is not installed.")) new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) {}, snapshot_on_cran = function(cnd) { skip("On CRAN") snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot") else if (!new_expectations && skip_on_empty) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip_empty() error = handle_error, interrupt = handle_interrupt), error = handle_fatal), } end_test = function() {}, expectation = handle_expectation, packageNotFoundError = function(e) { }) if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) } }, snapshot_on_cran = function(cnd) {28: snapshot_skipped <<- TRUEtest_code(code, parent.frame()) invokeRestart("muffle_cran_snapshot") }, skip = handle_skip, warning = handle_warning, message = handle_message, 29: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", end_test = function() { { }) sampler_undirected_nocov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, 40: "bernoulli", FALSE)test_code(code = exprs, env = env, reporter = get_reporter() %||% mySBM_sbm$optimize(estimOptions = list(verbosity = 0, StopReporter$new()) plot = FALSE)) mySBM_sbm$setModel(3)41: net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData)source_file(path, env = env(env), desc = desc, shuffle = shuffle, cl <- net$clustering(3)[[1]] error_call = error_call) mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, clusterInit = cl)42: mySBM_missSBM$doVEM()FUN(X[[i]], ...) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.05)43: expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, 0.95) error_call = error_call) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01)44: expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), doTryCatch(return(expr), name, parentenv, handler) 0.05) 45: expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), 0.95)tryCatchOne(expr, names, parentenv, handlers[[1L]]) })46: tryCatchList(expr, classes, parentenv, handlers)30: eval(code, test_env)47: tryCatch(code, testthat_abort_reporter = function(cnd) {31: cat(conditionMessage(cnd), "\n")eval(code, test_env) NULL })32: withCallingHandlers({48: eval(code, test_env)with_reporter(reporters$multi, lapply(test_paths, test_one_file, new_expectations <- the$test_expectations > starting_expectations env = env, desc = desc, shuffle = shuffle, error_call = error_call)) if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) {49: skip_empty()test_files_serial(test_dir = test_dir, test_package = test_package, } test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, }, expectation = handle_expectation, packageNotFoundError = function(e) { env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, if (on_cran()) { desc = desc, load_package = load_package, shuffle = shuffle, skip(paste0("{", e$package, "} is not installed.")) error_call = error_call) } }, snapshot_on_cran = function(cnd) {50: snapshot_skipped <<- TRUEtest_files(test_dir = path, test_paths = test_paths, test_package = package, invokeRestart("muffle_cran_snapshot") reporter = reporter, load_helpers = load_helpers, env = env, }, skip = handle_skip, warning = handle_warning, message = handle_message, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, error = handle_error, interrupt = handle_interrupt) load_package = load_package, parallel = parallel, shuffle = shuffle) 33: 51: doTryCatch(return(expr), name, parentenv, handler)test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")34: 52: test_check("missSBM")tryCatchOne(expr, names, parentenv, handlers[[1L]]) 35: An irrecoverable exception occurred. R is aborting now ... 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 ") Traceback: } 1: else prefix <- "Error : "dispatcher(membership_name, membership_init$to_cc(), model_name, msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) .self$network_to_cc(), TRUE) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) 2: .Internal(printDeferredWarnings())FUN(X[[i]], ...) } invisible(structure(msg, class = "try-error", condition = e)) 3: }) 8: lapply(X = S, FUN = FUN, ...)try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 4: 9: doTryCatch(return(expr), name, parentenv, handler)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 5: 10: tryCatchOne(expr, names, parentenv, handlers[[1L]])FUN(X[[i]], ...) 6: 11: tryCatchList(expr, classes, parentenv, handlers)lapply(seq_len(cores), inner.do) 7: tryCatch(expr, error = function(e) {12: call <- conditionCall(e)parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, if (!is.null(call)) { mc.silent = TRUE) if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L)13: dcall <- deparse(call, nlines = 1L)parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, prefix <- paste("Error in", dcall, ": ") verbose = (verbosity > 4)) LONG <- 75L14: sm <- strsplit(conditionMessage(e), "\n")[[1L]].self$do_with_inits(inits, Q, reinitialization_effort) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) 15: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], .self$estim_ascend(reinitialization_effort, changing_effort) type = "b")16: if (w > LONG) private$BMobject$estimate() prefix <- paste0(prefix, "\n ") 17: }mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n")18: eval(code, test_env) .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) {19: cat(msg, file = outFile)eval(code, test_env) .Internal(printDeferredWarnings()) }20: invisible(structure(msg, class = "try-error", condition = e))withCallingHandlers({ eval(code, test_env)}) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { 8: skip("On CRAN")try(lapply(X = S, FUN = FUN, ...), silent = TRUE) } else if (!new_expectations && skip_on_empty) { 9: skip_empty()sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {10: skip(paste0("{", e$package, "} is not installed."))FUN(X[[i]], ...) } }, snapshot_on_cran = function(cnd) {11: snapshot_skipped <<- TRUElapply(seq_len(cores), inner.do) invokeRestart("muffle_cran_snapshot") 12: }, skip = handle_skip, warning = handle_warning, message = handle_message, parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, error = handle_error, interrupt = handle_interrupt) mc.silent = TRUE) 13: 21: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, doTryCatch(return(expr), name, parentenv, handler) verbose = (verbosity > 4))22: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14: 23: .self$do_with_inits(inits, Q, reinitialization_effort)tryCatchList(expr, classes, parentenv, handlers) 15: 24: .self$estim_ascend(reinitialization_effort, changing_effort) tryCatch(withCallingHandlers({16: eval(code, test_env)private$BMobject$estimate() new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {17: skip("On CRAN")mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) } else if (!new_expectations && skip_on_empty) {18: skip_empty()eval(code, test_env) } }, expectation = handle_expectation, packageNotFoundError = function(e) {19: if (on_cran()) {eval(code, test_env) skip(paste0("{", e$package, "} is not installed.")) }20: }, snapshot_on_cran = function(cnd) {withCallingHandlers({ snapshot_skipped <<- TRUE eval(code, test_env) invokeRestart("muffle_cran_snapshot") new_expectations <- the$test_expectations > starting_expectations}, skip = handle_skip, warning = handle_warning, message = handle_message, if (snapshot_skipped) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) skip("On CRAN") }25: else if (!new_expectations && skip_on_empty) {doWithOneRestart(return(expr), restart) skip_empty() }26: }, expectation = handle_expectation, packageNotFoundError = function(e) {withOneRestart(expr, restarts[[1L]]) if (on_cran()) {27: skip(paste0("{", e$package, "} is not installed."))withRestarts(tryCatch(withCallingHandlers({ } eval(code, test_env)}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") new_expectations <- the$test_expectations > starting_expectations}, skip = handle_skip, warning = handle_warning, message = handle_message, if (snapshot_skipped) { error = handle_error, interrupt = handle_interrupt) skip("On CRAN") 21: } else if (!new_expectations && skip_on_empty) {doTryCatch(return(expr), name, parentenv, handler) skip_empty() 22: }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, expectation = handle_expectation, packageNotFoundError = function(e) { 23: if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))tryCatchList(expr, classes, parentenv, handlers) } }, snapshot_on_cran = function(cnd) {24: snapshot_skipped <<- TRUEtryCatch(withCallingHandlers({ invokeRestart("muffle_cran_snapshot") eval(code, test_env)}, skip = handle_skip, warning = handle_warning, message = handle_message, new_expectations <- the$test_expectations > starting_expectations error = handle_error, interrupt = handle_interrupt), error = handle_fatal), if (snapshot_skipped) { end_test = function() { skip("On CRAN") }) } else if (!new_expectations && skip_on_empty) { skip_empty()28: }test_code(code, parent.frame())}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) {29: snapshot_skipped <<- TRUEtest_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", invokeRestart("muffle_cran_snapshot") {}, skip = handle_skip, warning = handle_warning, message = handle_message, sampler_directed_nocov$rNetwork(store = TRUE) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, "bernoulli", TRUE)25: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, doWithOneRestart(return(expr), restart) plot = FALSE))26: mySBM_sbm$setModel(3)withOneRestart(expr, restarts[[1L]]) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) cl <- net$clustering(3)[[1]]27: mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) clusterInit = cl) new_expectations <- the$test_expectations > starting_expectations mySBM_missSBM$doVEM() if (snapshot_skipped) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), skip("On CRAN") 0.1) } expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), else if (!new_expectations && skip_on_empty) { 0.95) skip_empty() expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), } 0.01)}, expectation = handle_expectation, packageNotFoundError = function(e) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), if (on_cran()) { 0.1) skip(paste0("{", e$package, "} is not installed.")) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), } 0.2)}, snapshot_on_cran = function(cnd) { expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), snapshot_skipped <<- TRUE 0.95) invokeRestart("muffle_cran_snapshot") })}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 30: end_test = function() {eval(code, test_env) }) 31: 28: eval(code, test_env)test_code(code, parent.frame()) 29: 32: test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", withCallingHandlers({ { eval(code, test_env) sampler_directed_nocov$rNetwork(store = TRUE) new_expectations <- the$test_expectations > starting_expectations mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() "bernoulli", TRUE) } mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { mySBM_sbm$setModel(3) skip(paste0("{", e$package, "} is not installed.")) } net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData)}, snapshot_on_cran = function(cnd) { cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, snapshot_skipped <<- TRUE clusterInit = cl) invokeRestart("muffle_cran_snapshot") mySBM_missSBM$doVEM()}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1)33: expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), doTryCatch(return(expr), name, parentenv, handler) 0.95) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 34: 0.01)tryCatchOne(expr, names, parentenv, handlers[[1L]]) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), 0.1)35: expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), tryCatchList(expr, classes, parentenv, handlers) 0.2) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), 36: 0.95)tryCatch(withCallingHandlers({ }) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations30: if (snapshot_skipped) {eval(code, test_env) skip("On CRAN") }31: else if (!new_expectations && skip_on_empty) {eval(code, test_env) skip_empty() 32: }}, expectation = handle_expectation, packageNotFoundError = function(e) {withCallingHandlers({ if (on_cran()) { eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { 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")}, skip = handle_skip, warning = handle_warning, message = handle_message, }, expectation = handle_expectation, packageNotFoundError = function(e) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }37: }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUEdoWithOneRestart(return(expr), restart) 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: 33: withRestarts(tryCatch(withCallingHandlers({doTryCatch(return(expr), name, parentenv, handler) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") }34: else if (!new_expectations && skip_on_empty) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) skip_empty()35: }}, expectation = handle_expectation, packageNotFoundError = function(e) {tryCatchList(expr, classes, parentenv, handlers) if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))36: tryCatch(withCallingHandlers({ } eval(code, test_env)}, snapshot_on_cran = function(cnd) { new_expectations <- the$test_expectations > starting_expectations snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") if (snapshot_skipped) { skip("On CRAN")}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal), else if (!new_expectations && skip_on_empty) { end_test = function() { }) skip_empty() }40: }, expectation = handle_expectation, packageNotFoundError = function(e) {test_code(code = exprs, env = env, reporter = get_reporter() %||% if (on_cran()) { StopReporter$new()) 41: skip(paste0("{", e$package, "} is not installed."))source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call) }42: }, snapshot_on_cran = function(cnd) {FUN(X[[i]], ...) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")43: }, skip = handle_skip, warning = handle_warning, message = handle_message, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) error_call = error_call) 44: 37: doTryCatch(return(expr), name, parentenv, handler)doWithOneRestart(return(expr), restart) 38: 45: withOneRestart(expr, restarts[[1L]])tryCatchOne(expr, names, parentenv, handlers[[1L]]) 39: 46: withRestarts(tryCatch(withCallingHandlers({tryCatchList(expr, classes, parentenv, handlers) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations47: if (snapshot_skipped) {tryCatch(code, testthat_abort_reporter = function(cnd) { skip("On CRAN") cat(conditionMessage(cnd), "\n") } NULL 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, }, skip = handle_skip, warning = handle_warning, message = handle_message, error_call = error_call) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 50: end_test = function() {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, 40: load_package = load_package, parallel = parallel, shuffle = shuffle)test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())51: test_dir("testthat", package = package, reporter = reporter, 41: ..., load_package = "installed")source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)52: test_check("missSBM")42: FUN(X[[i]], ...)An irrecoverable exception occurred. R is aborting now ... 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