CRAN Package Check Results for Package missSBM

Last updated on 2026-10-27 05:58:19 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.1.0 82.72 340.58 423.30 OK
r-devel-linux-x86_64-debian-gcc 1.1.0 58.66 228.68 287.34 OK
r-devel-linux-x86_64-fedora-clang 1.1.0 59.00 271.80 330.80 OK
r-devel-linux-x86_64-fedora-gcc 1.1.0 62.00 241.02 303.02 OK
r-devel-windows-x86_64 1.1.0 91.00 417.00 508.00 OK
r-patched-linux-x86_64 1.1.0 87.75 330.28 418.03 OK
r-release-linux-x86_64 1.1.0 81.31 327.81 409.12 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 96.00 347.00 443.00 OK
r-oldrel-macos-arm64 1.1.0 20.00 85.00 105.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 117.00 477.00 594.00 OK

Check Details

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