CRAN Package Check Results for Package missSBM

Last updated on 2026-09-24 02:52:20 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.1.0 89.37 358.05 447.42 OK
r-devel-linux-x86_64-debian-gcc 1.1.0 57.55 243.49 301.04 OK
r-devel-linux-x86_64-fedora-clang 1.1.0 58.00 245.06 303.06 OK
r-devel-linux-x86_64-fedora-gcc 1.1.0 64.00 248.05 312.05 OK
r-devel-windows-x86_64 1.1.0 91.00 452.00 543.00 OK
r-patched-linux-x86_64 1.1.0 83.11 346.95 430.06 OK
r-release-linux-x86_64 1.1.0 90.56 343.79 434.35 OK
r-release-macos-arm64 1.1.0 17.00 92.00 109.00 OK
r-release-macos-x86_64 1.1.0 59.00 456.00 515.00 OK
r-release-windows-x86_64 1.1.0 98.00 361.00 459.00 OK
r-oldrel-macos-arm64 1.1.0 20.00 113.00 133.00 ERROR
r-oldrel-macos-x86_64 1.1.0 59.00 679.00 738.00 OK
r-oldrel-windows-x86_64 1.1.0 115.00 505.00 620.00 OK

Check Details

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