CRAN Package Check Results for Package missSBM

Last updated on 2026-11-18 23:51:18 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.1.0 84.27 375.05 459.32 OK
r-devel-linux-x86_64-debian-gcc 1.1.0 60.08 258.48 318.56 OK
r-devel-linux-x86_64-fedora-clang 1.1.0 60.00 254.27 314.27 OK
r-devel-linux-x86_64-fedora-gcc 1.1.0 63.00 262.15 325.15 OK
r-devel-windows-x86_64 1.1.0 91.00 459.00 550.00 OK
r-patched-linux-x86_64 1.1.0 80.59 359.22 439.81 OK
r-release-linux-x86_64 1.1.0 81.91 363.09 445.00 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 103.00 374.00 477.00 OK
r-oldrel-macos-arm64 1.1.0 19.00 103.00 122.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 115.00 517.00 632.00 OK

Check Details

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