CRAN Package Check Results for Package missSBM

Last updated on 2026-11-15 00:50:14 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.1.0 74.27 371.31 445.58 OK
r-devel-linux-x86_64-debian-gcc 1.1.0 57.20 257.14 314.34 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 64.00 257.44 321.44 OK
r-devel-windows-x86_64 1.1.0 91.00 422.00 513.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 78.58 329.18 407.76 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 99.00 414.00 513.00 OK
r-oldrel-macos-arm64 1.1.0 23.00 94.00 117.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 542.00 659.00 OK

Check Details

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