The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
Last updated on 2026-11-26 17:54:33 CET.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 1.1.0 | 87.74 | 382.33 | 470.07 | OK | |
| r-devel-linux-x86_64-debian-gcc | 1.1.0 | 61.09 | 262.19 | 323.28 | OK | |
| r-devel-linux-x86_64-fedora-clang | 1.1.0 | 61.00 | 261.11 | 322.11 | OK | |
| r-devel-linux-x86_64-fedora-gcc | 1.1.0 | 64.00 | 267.27 | 331.27 | OK | |
| r-devel-windows-x86_64 | 1.1.0 | 90.00 | 451.00 | 541.00 | OK | |
| r-patched-linux-x86_64 | 1.1.0 | 86.19 | 371.52 | 457.71 | OK | |
| r-release-linux-x86_64 | 1.1.0 | 82.38 | 369.49 | 451.87 | 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 | 90.00 | 387.00 | 477.00 | OK | |
| r-oldrel-macos-arm64 | 1.1.0 | 18.00 | 85.00 | 103.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 | 116.00 | 534.00 | 650.00 | OK |
Version: 1.1.0
Check: tests
Result: ERROR
Running ‘spelling.R’ [0s/0s]
Running ‘testthat.R’ [37s/30s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(missSBM)
>
> test_check("missSBM")
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'covar-dyad' network-sampling process
iteration #: 2
iteration #: 3
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'dyad' network-sampling process
iteration #: 2
iteration #: 3
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'covar-node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
Tested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'dyad' network-sampling process
Initialization of 3 model(s).
Tested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
- degreeTested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
- degree
sampling: dyad new better on connectivity
node
double-standard
block-node new better on mixture
Adjusting Variational EM for Stochastic Block Model
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
iteration #: 6
iteration #: 7
iteration #: 8
iteration #: 9
iteration #: 10
iteration #: 11
iteration #: 12
iteration #: 13
iteration #: 14
iteration #: 15
iteration #: 16
iteration #: 17
iteration #: 18
iteration #: 19
iteration #: 20
iteration #: 21
iteration #: 22
iteration #: 23
iteration #: 24
iteration #: 25
iteration #: 26
iteration #: 27
iteration #: 28
iteration #: 29
iteration #: 30
iteration #: 31
iteration #: 32
iteration #: 33
iteration #: 34
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
iteration #: 6
iteration #: 7
iteration #: 8
iteration #: 9
iteration #: 10
iteration #: 11
iteration #: 12
iteration #: 13
iteration #: 14
iteration #: 15
iteration #: 16
iteration #: 17
iteration #: 18
iteration #: 19
iteration #: 20
iteration #: 21
iteration #: 22
iteration #: 23
iteration #: 24
iteration #: 25
iteration #: 26
iteration #: 27
iteration #: 28
iteration #: 29
iteration #: 30
iteration #: 31
iteration #: 32
iteration #: 33
iteration #: 34
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'node' network-sampling process
Initialization of 1 model(s).
Performing VEM inference
Model with 3 blocks.
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'dyad' network-sampling process
Initialization of 2 model(s).
Performing VEM inference
Model with 2 blocks.
Model with 1 blocks.
Polishing (node-swap)
Looking for better solutions
Pass 1 Going forward +
Pass 1 Going backward +
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10:
Traceback:
FUN(X[[i]], ...) 1:
dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)11:
lapply(seq_len(cores), inner.do) 2:
FUN(X[[i]], ...)12:
parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, 3: mc.silent = TRUE)lapply(X = S, FUN = FUN, ...)
13: 4: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, doTryCatch(return(expr), name, parentenv, handler) verbose = (verbosity > 4))
5: 14: tryCatchOne(expr, names, parentenv, handlers[[1L]]).self$do_with_inits(inits, Q, reinitialization_effort)
6: 15: tryCatchList(expr, classes, parentenv, handlers).self$estim_ascend(reinitialization_effort, changing_effort)
7: 16: tryCatch(expr, error = function(e) {private$BMobject$estimate() call <- conditionCall(e)
if (!is.null(call)) {17: if (identical(call[[1L]], quote(doTryCatch))) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) call <- sys.call(-4L)
dcall <- deparse(call, nlines = 1L)18: prefix <- paste("Error in", dcall, ": ")eval(code, test_env) LONG <- 75L
sm <- strsplit(conditionMessage(e), "\n")[[1L]]19: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")eval(code, test_env) if (is.na(w))
w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 20: type = "b")withCallingHandlers({ if (w > LONG) prefix <- paste0(prefix, "\n ") eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) { else prefix <- "Error : " skip("On CRAN") msg <- paste0(prefix, conditionMessage(e), "\n") } .Internal(seterrmessage(msg[1L])) else if (!new_expectations && skip_on_empty) { if (!silent && isTRUE(getOption("show.error.messages"))) { skip_empty() cat(msg, file = outFile) } .Internal(printDeferredWarnings())}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) { invisible(structure(msg, class = "try-error", condition = e)) skip(paste0("{", e$package, "} is not installed."))}) }
}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE 8: invokeRestart("muffle_cran_snapshot")try(lapply(X = S, FUN = FUN, ...), silent = TRUE)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)
9: 21: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))doTryCatch(return(expr), name, parentenv, handler)
10: 22: FUN(X[[i]], ...)tryCatchOne(expr, names, parentenv, handlers[[1L]])
11: 23: lapply(seq_len(cores), inner.do)tryCatchList(expr, classes, parentenv, handlers)
12: 24: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, tryCatch(withCallingHandlers({ mc.silent = TRUE) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations13: if (snapshot_skipped) {parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, skip("On CRAN") verbose = (verbosity > 4)) }
else if (!new_expectations && skip_on_empty) {14: skip_empty().self$do_with_inits(inits, Q, reinitialization_effort) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {15: if (on_cran()) {.self$estim_ascend(reinitialization_effort, changing_effort) skip(paste0("{", e$package, "} is not installed."))
}16: }, snapshot_on_cran = function(cnd) {private$BMobject$estimate() snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")17: }, skip = handle_skip, warning = handle_warning, message = handle_message, mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
18: 25: eval(code, test_env)doWithOneRestart(return(expr), restart)
19: 26: eval(code, test_env)withOneRestart(expr, restarts[[1L]])
20: 27: withCallingHandlers({withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { if (snapshot_skipped) { skip("On CRAN") skip("On CRAN") } } else if (!new_expectations && skip_on_empty) { else if (!new_expectations && skip_on_empty) { skip_empty() skip_empty() } }}, expectation = handle_expectation, packageNotFoundError = function(e) {}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) skip(paste0("{", e$package, "} is not installed.")) } }}, snapshot_on_cran = function(cnd) {}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt) error = handle_error, interrupt = handle_interrupt), error = handle_fatal),
end_test = function() {21: })doTryCatch(return(expr), name, parentenv, handler)
28: 22: test_code(code, parent.frame())tryCatchOne(expr, names, parentenv, handlers[[1L]])
29: 23: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", tryCatchList(expr, classes, parentenv, handlers) {
sampler_undirected_cov$rNetwork(store = TRUE)24: mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, tryCatch(withCallingHandlers({ "bernoulli", FALSE, covarList = covarList_undirected) eval(code, test_env) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, new_expectations <- the$test_expectations > starting_expectations plot = FALSE)) if (snapshot_skipped) { mySBM_sbm$setModel(Q) skip("On CRAN") net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, } covariates = covarList_undirected) else if (!new_expectations && skip_on_empty) { cls <- net$clustering(1:(2 * Q)) skip_empty() cl <- cls[[Q]] } mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, }, expectation = handle_expectation, packageNotFoundError = function(e) { clusterInit = cl, covarList = covarList_undirected) if (on_cran()) { mySBM_missSBM$doVEM() skip(paste0("{", e$package, "} is not installed.")) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), } 0.05)}, snapshot_on_cran = function(cnd) { expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), snapshot_skipped <<- TRUE 0.8) invokeRestart("muffle_cran_snapshot") expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), }, skip = handle_skip, warning = handle_warning, message = handle_message, 0.01) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean),
0.1)25: expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), doWithOneRestart(return(expr), restart) 0.1)
expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), 26: 0.85)withOneRestart(expr, restarts[[1L]]) })
27: 30: withRestarts(tryCatch(withCallingHandlers({eval(code, test_env) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations31: if (snapshot_skipped) {eval(code, test_env) skip("On CRAN")
}32: else if (!new_expectations && skip_on_empty) {withCallingHandlers({ skip_empty() eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, expectation = handle_expectation, packageNotFoundError = function(e) { if (snapshot_skipped) { if (on_cran()) { skip("On CRAN") skip(paste0("{", e$package, "} is not installed.")) } } else if (!new_expectations && skip_on_empty) {}, 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 <<- TRUE28: test_code(code, parent.frame()) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 29: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", error = handle_error, interrupt = handle_interrupt) {
sampler_undirected_cov$rNetwork(store = TRUE)33: mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, doTryCatch(return(expr), name, parentenv, handler) "bernoulli", FALSE, covarList = covarList_undirected)
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, 34: plot = FALSE))tryCatchOne(expr, names, parentenv, handlers[[1L]])
mySBM_sbm$setModel(Q)35: net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, tryCatchList(expr, classes, parentenv, handlers) covariates = covarList_undirected)
cls <- net$clustering(1:(2 * Q))36: cl <- cls[[Q]]tryCatch(withCallingHandlers({ mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, eval(code, test_env) clusterInit = cl, covarList = covarList_undirected) new_expectations <- the$test_expectations > starting_expectations mySBM_missSBM$doVEM() if (snapshot_skipped) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), skip("On CRAN") 0.05) } expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), else if (!new_expectations && skip_on_empty) { 0.8) skip_empty() expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), } 0.01)}, expectation = handle_expectation, packageNotFoundError = function(e) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), if (on_cran()) { 0.1) skip(paste0("{", e$package, "} is not installed.")) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), } 0.1)}, snapshot_on_cran = function(cnd) { expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), snapshot_skipped <<- TRUE 0.85) invokeRestart("muffle_cran_snapshot") })}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)30:
eval(code, test_env)37:
doWithOneRestart(return(expr), restart)31:
eval(code, test_env)38:
withOneRestart(expr, restarts[[1L]])32:
withCallingHandlers({39: eval(code, test_env)withRestarts(tryCatch(withCallingHandlers({ new_expectations <- the$test_expectations > starting_expectations eval(code, test_env) if (snapshot_skipped) { new_expectations <- the$test_expectations > starting_expectations skip("On CRAN") if (snapshot_skipped) { } skip("On CRAN") else if (!new_expectations && skip_on_empty) { } 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), error = handle_fatal), 33: end_test = function() {doTryCatch(return(expr), name, parentenv, handler) })
34: 40: tryCatchOne(expr, names, parentenv, handlers[[1L]])test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())
35: 41: tryCatchList(expr, classes, parentenv, handlers)source_file(path, env = env(env), desc = desc, shuffle = shuffle,
error_call = error_call)36:
tryCatch(withCallingHandlers({42: eval(code, test_env)FUN(X[[i]], ...) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {43: skip("On CRAN")lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, } error_call = error_call) else if (!new_expectations && skip_on_empty) {
skip_empty()44: }doTryCatch(return(expr), name, parentenv, handler)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {45: skip(paste0("{", e$package, "} is not installed."))tryCatchOne(expr, names, parentenv, handlers[[1L]]) }
}, snapshot_on_cran = function(cnd) {46: snapshot_skipped <<- TRUEtryCatchList(expr, classes, parentenv, handlers) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 47: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)tryCatch(code, testthat_abort_reporter = function(cnd) {
cat(conditionMessage(cnd), "\n")37: NULLdoWithOneRestart(return(expr), restart)})
38: 48: withOneRestart(expr, restarts[[1L]])with_reporter(reporters$multi, lapply(test_paths, test_one_file,
env = env, desc = desc, shuffle = shuffle, error_call = error_call))39:
withRestarts(tryCatch(withCallingHandlers({49: eval(code, test_env)test_files_serial(test_dir = test_dir, test_package = test_package, new_expectations <- the$test_expectations > starting_expectations test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, if (snapshot_skipped) { env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, skip("On CRAN") desc = desc, load_package = load_package, shuffle = shuffle, } error_call = error_call) else if (!new_expectations && skip_on_empty) {
skip_empty()50: }test_files(test_dir = path, test_paths = test_paths, test_package = package, }, expectation = handle_expectation, packageNotFoundError = function(e) { reporter = reporter, load_helpers = load_helpers, env = env, if (on_cran()) { stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, skip(paste0("{", e$package, "} is not installed.")) load_package = load_package, parallel = parallel, shuffle = shuffle) }
}, snapshot_on_cran = function(cnd) {51: snapshot_skipped <<- TRUEtest_dir("testthat", package = package, reporter = reporter, invokeRestart("muffle_cran_snapshot") ..., load_package = "installed")}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
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:
dispatcher(membership_name, membership_init$to_cc(), model_name, 6: tryCatchList(expr, classes, parentenv, handlers) .self$network_to_cc(), TRUE)
7: 2: tryCatch(expr, error = function(e) {FUN(X[[i]], ...) call <- conditionCall(e)
if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) 3: lapply(X = S, FUN = FUN, ...) call <- sys.call(-4L)
dcall <- deparse(call, nlines = 1L) 4: prefix <- paste("Error in", dcall, ": ")doTryCatch(return(expr), name, parentenv, handler) LONG <- 75L
sm <- strsplit(conditionMessage(e), "\n")[[1L]] 5: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (is.na(w))
w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 6: type = "b")tryCatchList(expr, classes, parentenv, handlers)
if (w > LONG) prefix <- paste0(prefix, "\n ") 7: }tryCatch(expr, error = function(e) { call <- conditionCall(e) else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") if (!is.null(call)) { .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { if (identical(call[[1L]], quote(doTryCatch))) cat(msg, file = outFile) call <- sys.call(-4L) .Internal(printDeferredWarnings()) 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")
if (w > LONG) prefix <- paste0(prefix, "\n ") 9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) }
else prefix <- "Error : "10: msg <- paste0(prefix, conditionMessage(e), "\n")FUN(X[[i]], ...) .Internal(seterrmessage(msg[1L]))
if (!silent && isTRUE(getOption("show.error.messages"))) {11: cat(msg, file = outFile)lapply(seq_len(cores), inner.do) .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,
verbose = (verbosity > 4)) 9:
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))14:
.self$do_with_inits(inits, Q, reinitialization_effort)10:
15: FUN(X[[i]], ...).self$estim_ascend(reinitialization_effort, changing_effort)
11: 16: lapply(seq_len(cores), inner.do)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))
18: 13: eval(code, test_env)parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores,
verbose = (verbosity > 4))19:
eval(code, test_env)14:
.self$do_with_inits(inits, Q, reinitialization_effort)20:
withCallingHandlers({15: eval(code, test_env).self$estim_ascend(reinitialization_effort, changing_effort) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) { skip("On CRAN")16: }private$BMobject$estimate() else if (!new_expectations && skip_on_empty) {
skip_empty()17: }mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {18: skip(paste0("{", e$package, "} is not installed."))eval(code, test_env) }
}, snapshot_on_cran = function(cnd) {19: snapshot_skipped <<- TRUEeval(code, test_env) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 20: error = handle_error, interrupt = handle_interrupt)withCallingHandlers({
eval(code, test_env)21: new_expectations <- the$test_expectations > starting_expectationsdoTryCatch(return(expr), name, parentenv, handler) if (snapshot_skipped) {
skip("On CRAN")22: }tryCatchOne(expr, names, parentenv, handlers[[1L]]) else if (!new_expectations && skip_on_empty) {
skip_empty()23: }tryCatchList(expr, classes, parentenv, handlers)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {24: skip(paste0("{", e$package, "} is not installed."))tryCatch(withCallingHandlers({ } eval(code, test_env)}, snapshot_on_cran = function(cnd) { new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { snapshot_skipped <<- TRUE skip("On CRAN") invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, else if (!new_expectations && skip_on_empty) { error = handle_error, interrupt = handle_interrupt) skip_empty()
}21: }, expectation = handle_expectation, packageNotFoundError = function(e) {doTryCatch(return(expr), name, parentenv, handler) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))22: }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE23: invokeRestart("muffle_cran_snapshot")tryCatchList(expr, classes, parentenv, handlers)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)24:
tryCatch(withCallingHandlers({25: eval(code, test_env)doWithOneRestart(return(expr), restart) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {26: skip("On CRAN")withOneRestart(expr, restarts[[1L]]) }
else if (!new_expectations && skip_on_empty) {27: skip_empty()withRestarts(tryCatch(withCallingHandlers({ } eval(code, test_env)}, expectation = handle_expectation, packageNotFoundError = function(e) { new_expectations <- the$test_expectations > starting_expectations if (on_cran()) { if (snapshot_skipped) { skip(paste0("{", e$package, "} is not installed.")) skip("On CRAN") } } 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."))
}25: }, snapshot_on_cran = function(cnd) {doWithOneRestart(return(expr), restart) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")26: }, skip = handle_skip, warning = handle_warning, message = handle_message, withOneRestart(expr, restarts[[1L]]) error = handle_error, interrupt = handle_interrupt), error = handle_fatal),
end_test = function() {27: })withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)28: new_expectations <- the$test_expectations > starting_expectationstest_code(code, parent.frame()) if (snapshot_skipped) {
skip("On CRAN")29: }test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", else if (!new_expectations && skip_on_empty) { { skip_empty() sampler_directed_cov$rNetwork(store = TRUE) } mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, }, expectation = handle_expectation, packageNotFoundError = function(e) { "bernoulli", TRUE, covarList = covarList_directed) if (on_cran()) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(Q) skip(paste0("{", e$package, "} is not installed.")) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, } covariates = covarList_directed)}, snapshot_on_cran = function(cnd) { cls <- net$clustering(1:(2 * Q)) snapshot_skipped <<- TRUE cl <- cls[[Q]] invokeRestart("muffle_cran_snapshot") mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, }, skip = handle_skip, warning = handle_warning, message = handle_message, clusterInit = cl, covarList = covarList_directed) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), mySBM_missSBM$doVEM(trace = TRUE) end_test = function() { expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), }) 0.1)
expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.8) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 28: test_code(code, parent.frame()) 0.05)
expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), 29: test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", 0.1) { sampler_directed_cov$rNetwork(store = TRUE) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), 0.85) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, }) "bernoulli", TRUE, covarList = covarList_directed)
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, 30: plot = FALSE)) mySBM_sbm$setModel(Q)eval(code, test_env) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData,
covariates = covarList_directed)31: cls <- net$clustering(1:(2 * Q))eval(code, test_env) cl <- cls[[Q]]
mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, 32: clusterInit = cl, covarList = covarList_directed)withCallingHandlers({ mySBM_missSBM$doVEM(trace = TRUE) eval(code, test_env) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), new_expectations <- the$test_expectations > starting_expectations 0.1) if (snapshot_skipped) { expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), skip("On CRAN") 0.8) } expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), else if (!new_expectations && skip_on_empty) { 0.05) skip_empty() expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), } 0.1)}, expectation = handle_expectation, packageNotFoundError = function(e) { expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), if (on_cran()) { 0.85) 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, 30: error = handle_error, interrupt = handle_interrupt)eval(code, test_env)
33: 31: doTryCatch(return(expr), name, parentenv, handler)
34: eval(code, test_env)tryCatchOne(expr, names, parentenv, handlers[[1L]])
32: withCallingHandlers({35: tryCatchList(expr, classes, parentenv, handlers)
36: eval(code, test_env)tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { if (snapshot_skipped) { skip("On CRAN") skip("On CRAN") } } else if (!new_expectations && skip_on_empty) { else if (!new_expectations && skip_on_empty) { skip_empty() skip_empty() } }}, expectation = handle_expectation, packageNotFoundError = function(e) {}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) skip(paste0("{", e$package, "} is not installed.")) } }}, snapshot_on_cran = function(cnd) {}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)33:
doTryCatch(return(expr), name, parentenv, handler)37:
doWithOneRestart(return(expr), restart)34:
tryCatchOne(expr, names, parentenv, handlers[[1L]])38:
withOneRestart(expr, restarts[[1L]])35:
tryCatchList(expr, classes, parentenv, handlers)
36: 39: tryCatch(withCallingHandlers({ 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) {}, 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()) { 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,
37: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), doWithOneRestart(return(expr), restart) end_test = function() {
38: })withOneRestart(expr, restarts[[1L]])
40:
test_code(code = exprs, env = env, reporter = get_reporter() %||% 39: StopReporter$new())withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)41: new_expectations <- the$test_expectations > starting_expectationssource_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call) if (snapshot_skipped) {
skip("On CRAN")42: }FUN(X[[i]], ...) else if (!new_expectations && skip_on_empty) {
skip_empty() }43: }, expectation = handle_expectation, packageNotFoundError = function(e) {lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, if (on_cran()) { error_call = error_call) skip(paste0("{", e$package, "} is not installed."))
}44: }, snapshot_on_cran = function(cnd) {doTryCatch(return(expr), name, parentenv, handler) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")45: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatchOne(expr, names, parentenv, handlers[[1L]]) error = handle_error, interrupt = handle_interrupt), error = handle_fatal),
end_test = function() {46: })tryCatchList(expr, classes, parentenv, handlers)
40: 47: test_code(code = exprs, env = env, reporter = get_reporter() %||% tryCatch(code, testthat_abort_reporter = function(cnd) { StopReporter$new()) cat(conditionMessage(cnd), "\n")
NULL41: })source_file(path, env = env(env), desc = desc, shuffle = shuffle,
error_call = error_call)48:
with_reporter(reporters$multi, lapply(test_paths, test_one_file, 42: env = env, desc = desc, shuffle = shuffle, error_call = error_call))FUN(X[[i]], ...)
49: 43: test_files_serial(test_dir = test_dir, test_package = test_package, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, error_call = error_call) env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
desc = desc, load_package = load_package, shuffle = shuffle, 44: error_call = error_call)doTryCatch(return(expr), name, parentenv, handler)
50: 45: test_files(test_dir = path, test_paths = test_paths, test_package = package, tryCatchOne(expr, names, parentenv, handlers[[1L]]) reporter = reporter, load_helpers = load_helpers, env = env,
46: stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, tryCatchList(expr, classes, parentenv, handlers) load_package = load_package, parallel = parallel, shuffle = shuffle)
47: 51: tryCatch(code, testthat_abort_reporter = function(cnd) {test_dir("testthat", package = package, reporter = reporter, cat(conditionMessage(cnd), "\n") ..., load_package = "installed") NULL
})52:
test_check("missSBM")48:
with_reporter(reporters$multi, lapply(test_paths, test_one_file, An irrecoverable exception occurred. R is aborting now ...
env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-with-covariates-46.R
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10: FUN(X[[i]], ...)
11: lapply(seq_len(cores), inner.do)
12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)
13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4))
14: .self$do_with_inits(inits, Q, reinitialization_effort)
15: .self$estim_ascend(reinitialization_effort, changing_effort)
16: private$BMobject$estimate()
17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
18: eval(code, test_env)
Traceback:
19: 1: eval(code, test_env)dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
20: 2: withCallingHandlers({FUN(X[[i]], ...) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations 3: if (snapshot_skipped) {lapply(X = S, FUN = FUN, ...) skip("On CRAN")
} 4: else if (!new_expectations && skip_on_empty) {doTryCatch(return(expr), name, parentenv, handler) skip_empty()
}}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) skip(paste0("{", e$package, "} is not installed."))
} 6: }, snapshot_on_cran = function(cnd) {tryCatchList(expr, classes, parentenv, handlers) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot") 7: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatch(expr, error = function(e) { error = handle_error, interrupt = handle_interrupt)
call <- conditionCall(e)21: if (!is.null(call)) {doTryCatch(return(expr), name, parentenv, handler) if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L)
prefix <- paste("Error in", dcall, ": ")22: LONG <- 75LtryCatchOne(expr, names, parentenv, handlers[[1L]]) sm <- strsplit(conditionMessage(e), "\n")[[1L]]
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")23: if (is.na(w)) tryCatchList(expr, classes, parentenv, handlers) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
type = "b")24: if (w > LONG) tryCatch(withCallingHandlers({ prefix <- paste0(prefix, "\n ") eval(code, test_env) } else prefix <- "Error : " new_expectations <- the$test_expectations > starting_expectations msg <- paste0(prefix, conditionMessage(e), "\n") if (snapshot_skipped) { .Internal(seterrmessage(msg[1L])) skip("On CRAN") if (!silent && isTRUE(getOption("show.error.messages"))) { } else if (!new_expectations && skip_on_empty) { cat(msg, file = outFile) skip_empty() .Internal(printDeferredWarnings()) } }}, expectation = handle_expectation, packageNotFoundError = function(e) { invisible(structure(msg, class = "try-error", condition = e))}) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed.")) 8: }try(lapply(X = S, FUN = FUN, ...), silent = TRUE)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE 9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) invokeRestart("muffle_cran_snapshot")
10: }, skip = handle_skip, warning = handle_warning, message = handle_message, FUN(X[[i]], ...) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
11: 25: lapply(seq_len(cores), inner.do)
doWithOneRestart(return(expr), restart)12:
parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, 26: mc.silent = TRUE)withOneRestart(expr, restarts[[1L]])
13: 27: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, withRestarts(tryCatch(withCallingHandlers({ verbose = (verbosity > 4)) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {14: skip("On CRAN").self$do_with_inits(inits, Q, reinitialization_effort) }
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: }, snapshot_on_cran = function(cnd) {mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) 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), error = handle_fatal),
end_test = function() {19: eval(code, test_env) })
20: 28: withCallingHandlers({test_code(code, parent.frame()) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations29: if (snapshot_skipped) {test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", skip("On CRAN") { } sampler_undirected_nocov$rNetwork(store = TRUE) else if (!new_expectations && skip_on_empty) { skip_empty() } mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, }, expectation = handle_expectation, packageNotFoundError = function(e) { "bernoulli", FALSE) if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, } plot = FALSE))}, snapshot_on_cran = function(cnd) { mySBM_sbm$setModel(3) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) cl <- net$clustering(3)[[1]]}, skip = handle_skip, warning = handle_warning, message = handle_message, mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, error = handle_error, interrupt = handle_interrupt) clusterInit = cl)
mySBM_missSBM$doVEM()21: expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), doTryCatch(return(expr), name, parentenv, handler) 0.05)
expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.95)22: expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01)tryCatchOne(expr, names, parentenv, handlers[[1L]]) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean),
0.05)23: expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), 0.95)tryCatchList(expr, classes, parentenv, handlers) })
24: 30: tryCatch(withCallingHandlers({eval(code, test_env) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations31: if (snapshot_skipped) {eval(code, test_env)
32: skip("On CRAN")withCallingHandlers({ } eval(code, test_env) else if (!new_expectations && skip_on_empty) { new_expectations <- the$test_expectations > starting_expectations skip_empty() if (snapshot_skipped) { } skip("On CRAN")}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) { else if (!new_expectations && skip_on_empty) { skip(paste0("{", e$package, "} is not installed.")) skip_empty() } }}, snapshot_on_cran = function(cnd) {}, expectation = handle_expectation, packageNotFoundError = function(e) { snapshot_skipped <<- TRUE if (on_cran()) { invokeRestart("muffle_cran_snapshot") skip(paste0("{", e$package, "} is not installed."))}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE25: invokeRestart("muffle_cran_snapshot")doWithOneRestart(return(expr), restart)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)26:
withOneRestart(expr, restarts[[1L]])33: doTryCatch(return(expr), name, parentenv, handler)
27: withRestarts(tryCatch(withCallingHandlers({34: 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) {
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) { } skip("On CRAN")}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE else if (!new_expectations && skip_on_empty) { invokeRestart("muffle_cran_snapshot")}, 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."))28: }test_code(code, parent.frame())}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE29: invokeRestart("muffle_cran_snapshot")test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", }, skip = handle_skip, warning = handle_warning, message = handle_message, { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) sampler_undirected_nocov$rNetwork(store = TRUE)
mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, 37: "bernoulli", FALSE)doWithOneRestart(return(expr), restart) mySBM_sbm$optimize(estimOptions = list(verbosity = 0,
plot = FALSE))38: mySBM_sbm$setModel(3)withOneRestart(expr, restarts[[1L]])
net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData)39: withRestarts(tryCatch(withCallingHandlers({ cl <- net$clustering(3)[[1]] eval(code, test_env) mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, new_expectations <- the$test_expectations > starting_expectations clusterInit = cl) if (snapshot_skipped) { mySBM_missSBM$doVEM() skip("On CRAN") expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), } 0.05) else if (!new_expectations && skip_on_empty) { expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.95) skip_empty() expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), } 0.01)}, expectation = handle_expectation, packageNotFoundError = function(e) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), if (on_cran()) { 0.05) skip(paste0("{", e$package, "} is not installed.")) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), } 0.95)}, snapshot_on_cran = function(cnd) { })
snapshot_skipped <<- TRUE30: invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, eval(code, test_env) error = handle_error, interrupt = handle_interrupt), error = handle_fatal),
end_test = function() { })31:
eval(code, test_env)40:
test_code(code = exprs, env = env, reporter = get_reporter() %||% 32: StopReporter$new())withCallingHandlers({
eval(code, test_env)41: new_expectations <- the$test_expectations > starting_expectationssource_file(path, env = env(env), desc = desc, shuffle = shuffle, if (snapshot_skipped) { error_call = error_call)
skip("On CRAN")42: }FUN(X[[i]], ...) else if (!new_expectations && skip_on_empty) {
skip_empty()43: }lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, }, expectation = handle_expectation, packageNotFoundError = function(e) { error_call = error_call) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed.")) }44: }, snapshot_on_cran = function(cnd) {doTryCatch(return(expr), name, parentenv, handler) snapshot_skipped <<- TRUE
45: 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)46:
tryCatchList(expr, classes, parentenv, handlers)33:
doTryCatch(return(expr), name, parentenv, handler)47:
tryCatch(code, testthat_abort_reporter = function(cnd) {34: cat(conditionMessage(cnd), "\n")tryCatchOne(expr, names, parentenv, handlers[[1L]]) NULL
})35:
tryCatchList(expr, classes, parentenv, handlers)48:
with_reporter(reporters$multi, lapply(test_paths, test_one_file, 36: env = env, desc = desc, shuffle = shuffle, error_call = error_call))tryCatch(withCallingHandlers({
eval(code, test_env)49: new_expectations <- the$test_expectations > starting_expectationstest_files_serial(test_dir = test_dir, test_package = test_package, if (snapshot_skipped) { test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, skip("On CRAN") env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, } desc = desc, load_package = load_package, shuffle = shuffle, else if (!new_expectations && skip_on_empty) { error_call = error_call) skip_empty()
}50: }, expectation = handle_expectation, packageNotFoundError = function(e) {test_files(test_dir = path, test_paths = test_paths, test_package = package, if (on_cran()) { reporter = reporter, load_helpers = load_helpers, env = env, skip(paste0("{", e$package, "} is not installed.")) stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, } load_package = load_package, parallel = parallel, shuffle = shuffle)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")51: test_dir("testthat", package = package, reporter = reporter, }, skip = handle_skip, warning = handle_warning, message = handle_message, ..., load_package = "installed") error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
52: test_check("missSBM")37: doWithOneRestart(return(expr), restart)
An irrecoverable exception occurred. R is aborting now ...
38: withOneRestart(expr, restarts[[1L]])
39: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
40: test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())
41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)
42: FUN(X[[i]], ...)
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
44: doTryCatch(return(expr), name, parentenv, handler)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: tryCatchList(expr, classes, parentenv, handlers)
47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-without-covariate-16.R
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6:
Traceback:
1: tryCatchList(expr, classes, parentenv, handlers)dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
7:
tryCatch(expr, error = function(e) { 2: call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) FUN(X[[i]], ...) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L)
prefix <- paste("Error in", dcall, ": ") 3: LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]]lapply(X = S, FUN = FUN, ...)
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) 4: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], doTryCatch(return(expr), name, parentenv, handler) type = "b") if (w > LONG)
prefix <- paste0(prefix, "\n ") 5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
} else prefix <- "Error : " 6: msg <- paste0(prefix, conditionMessage(e), "\n")tryCatchList(expr, classes, parentenv, handlers) .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile)
.Internal(printDeferredWarnings()) } 7: invisible(structure(msg, class = "try-error", condition = e))})tryCatch(expr, error = function(e) {
call <- conditionCall(e) 8: if (!is.null(call)) {try(lapply(X = S, FUN = FUN, ...), silent = TRUE) if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L)
dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") 9: LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]]sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
10: if (is.na(w)) FUN(X[[i]], ...)
w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 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, verbose = (verbosity > 4)) .Internal(printDeferredWarnings()) }
14: invisible(structure(msg, class = "try-error", condition = e))}).self$do_with_inits(inits, Q, reinitialization_effort)
15: 8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE).self$estim_ascend(reinitialization_effort, changing_effort)
9: 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))private$BMobject$estimate()
10: 17: FUN(X[[i]], ...)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
11: 18: eval(code, test_env)lapply(seq_len(cores), inner.do)
19: 12: eval(code, test_env)parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE,
mc.silent = TRUE)
20: 13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, withCallingHandlers({ verbose = (verbosity > 4))
eval(code, test_env)14: .self$do_with_inits(inits, Q, reinitialization_effort) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) { skip("On CRAN")15: }.self$estim_ascend(reinitialization_effort, changing_effort) else if (!new_expectations && skip_on_empty) { skip_empty()
16: }}, expectation = handle_expectation, packageNotFoundError = function(e) {private$BMobject$estimate() if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))
}}, snapshot_on_cran = function(cnd) {17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")
18: }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)eval(code, test_env)
21:
19: doTryCatch(return(expr), name, parentenv, handler)
eval(code, test_env)
22: tryCatchOne(expr, names, parentenv, handlers[[1L]])20:
withCallingHandlers({23: eval(code, test_env)tryCatchList(expr, classes, parentenv, handlers) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {24: skip("On CRAN")tryCatch(withCallingHandlers({ } 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) { } if (on_cran()) { else if (!new_expectations && skip_on_empty) { skip(paste0("{", e$package, "} is not installed.")) skip_empty() } }}, snapshot_on_cran = function(cnd) {}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) snapshot_skipped <<- TRUE }}, snapshot_on_cran = function(cnd) { invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)21: doTryCatch(return(expr), name, parentenv, handler)
25: 22: doWithOneRestart(return(expr), restart)tryCatchOne(expr, names, parentenv, handlers[[1L]])
23: 26: withOneRestart(expr, restarts[[1L]])tryCatchList(expr, classes, parentenv, handlers)
27:
withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env)24: new_expectations <- the$test_expectations > starting_expectationstryCatch(withCallingHandlers({ 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()) { }}, 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) { snapshot_skipped <<- TRUE error = handle_error, interrupt = handle_interrupt), error = handle_fatal), invokeRestart("muffle_cran_snapshot") end_test = function() { })}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)28:
25: test_code(code, parent.frame())
doWithOneRestart(return(expr), restart)29:
test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", {26: withOneRestart(expr, restarts[[1L]]) sampler_directed_nocov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData,
27: "bernoulli", TRUE) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, withRestarts(tryCatch(withCallingHandlers({ plot = FALSE)) eval(code, test_env) mySBM_sbm$setModel(3) new_expectations <- the$test_expectations > starting_expectations net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) if (snapshot_skipped) { cl <- net$clustering(3)[[1]] skip("On CRAN") mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, } clusterInit = cl) else if (!new_expectations && skip_on_empty) { mySBM_missSBM$doVEM() skip_empty() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), } 0.1)}, expectation = handle_expectation, packageNotFoundError = function(e) { expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), if (on_cran()) { 0.95) skip(paste0("{", e$package, "} is not installed.")) } expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), }, snapshot_on_cran = function(cnd) { 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") 0.1) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 0.2) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), end_test = function() { 0.95) }) })
30: 28: eval(code, test_env)
test_code(code, parent.frame())
31: 29: eval(code, test_env)
test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", {32: withCallingHandlers({ sampler_directed_nocov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, eval(code, test_env) "bernoulli", TRUE) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) skip("On CRAN") } mySBM_sbm$setModel(3) else if (!new_expectations && skip_on_empty) { net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) skip_empty() cl <- net$clustering(3)[[1]] } mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, }, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { clusterInit = cl) skip(paste0("{", e$package, "} is not installed.")) mySBM_missSBM$doVEM() }}, snapshot_on_cran = function(cnd) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.95)}, skip = handle_skip, warning = handle_warning, message = handle_message, expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), error = handle_error, interrupt = handle_interrupt) 0.01)
33: expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), 0.1)doTryCatch(return(expr), name, parentenv, handler)
expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), 0.2)34: tryCatchOne(expr, names, parentenv, handlers[[1L]]) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), 0.95)
35: })
tryCatchList(expr, classes, parentenv, handlers)
30: 36: tryCatch(withCallingHandlers({eval(code, test_env) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations31: if (snapshot_skipped) {eval(code, test_env) skip("On CRAN")
}32: else if (!new_expectations && skip_on_empty) {withCallingHandlers({ skip_empty() eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, expectation = handle_expectation, packageNotFoundError = function(e) { if (snapshot_skipped) { if (on_cran()) { skip("On CRAN") skip(paste0("{", e$package, "} is not installed.")) } else if (!new_expectations && skip_on_empty) { } skip_empty()}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, expectation = handle_expectation, packageNotFoundError = function(e) { invokeRestart("muffle_cran_snapshot") if (on_cran()) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip(paste0("{", e$package, "} is not installed.")) error = handle_error, interrupt = handle_interrupt), 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)withOneRestart(expr, restarts[[1L]])
33: doTryCatch(return(expr), name, parentenv, handler)
39:
withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {34: skip("On CRAN")tryCatchOne(expr, names, parentenv, handlers[[1L]]) }
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), } 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)
37: doWithOneRestart(return(expr), restart)42:
FUN(X[[i]], ...)
38: 43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, withOneRestart(expr, restarts[[1L]]) error_call = error_call)
39: 44: withRestarts(tryCatch(withCallingHandlers({doTryCatch(return(expr), name, parentenv, handler) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations45: tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (snapshot_skipped) { skip("On CRAN")
}46: else if (!new_expectations && skip_on_empty) {tryCatchList(expr, classes, parentenv, handlers) skip_empty()
}47: tryCatch(code, testthat_abort_reporter = function(cnd) {}, expectation = handle_expectation, packageNotFoundError = function(e) { cat(conditionMessage(cnd), "\n") if (on_cran()) { NULL skip(paste0("{", e$package, "} is not installed."))}) }
}, snapshot_on_cran = function(cnd) {48: snapshot_skipped <<- TRUEwith_reporter(reporters$multi, lapply(test_paths, test_one_file, invokeRestart("muffle_cran_snapshot") 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), 49: end_test = function() {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, 40: desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
test_code(code = exprs, env = env, reporter = get_reporter() %||% 50: StopReporter$new())test_files(test_dir = path, test_paths = test_paths, test_package = package,
41: 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)
source_file(path, env = env(env), desc = desc, shuffle = shuffle, 51: error_call = error_call)test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: 42: test_check("missSBM")
FUN(X[[i]], ...)An irrecoverable exception occurred. R is aborting now ...
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
44: doTryCatch(return(expr), name, parentenv, handler)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: tryCatchList(expr, classes, parentenv, handlers)
47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-without-covariate-44.R
[ FAIL 4 | WARN 4 | SKIP 3 | PASS 531 ]
══ Skipped tests (3) ═══════════════════════════════════════════════════════════
• On CRAN (3): 'test-explore-block-count.R:4:3',
'test-missSBM_collection-degenerate.R:80:3',
'test-missSBM_collection-estimate_chain.R:64:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-sbm-bernoulli-with-covariates.R:16:3'): SimpleSBM_fit 'Bernoulli' model, undirected, one covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-with-covariates.R:16:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
── Error ('test-sbm-bernoulli-with-covariates.R:46:3'): SimpleSBM_fit 'Bernoulli' model, directed, one covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-with-covariates.R:46:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
── Error ('test-sbm-bernoulli-without-covariate.R:16:3'): SimpleSBM_fit 'Bernoulli' model, undirected, no covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-without-covariate.R:16:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
── Error ('test-sbm-bernoulli-without-covariate.R:44:3'): SimpleSBM_fit 'Bernoulli' model, directed, no covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-without-covariate.R:44:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
[ FAIL 4 | WARN 4 | SKIP 3 | PASS 531 ]
Error:
! Test failures.
Execution halted
Flavor: r-oldrel-macos-arm64
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.