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-04 12:01:26 CET.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 1.1.0 | 81.92 | 340.67 | 422.59 | OK | |
| r-devel-linux-x86_64-debian-gcc | 1.1.0 | 63.18 | 234.77 | 297.95 | OK | |
| r-devel-linux-x86_64-fedora-clang | 1.1.0 | 60.00 | 235.13 | 295.13 | OK | |
| r-devel-linux-x86_64-fedora-gcc | 1.1.0 | 64.00 | 239.38 | 303.38 | OK | |
| r-devel-windows-x86_64 | 1.1.0 | 91.00 | 417.00 | 508.00 | OK | |
| r-patched-linux-x86_64 | 1.1.0 | 85.14 | 334.40 | 419.54 | OK | |
| r-release-linux-x86_64 | 1.1.0 | 78.27 | 331.21 | 409.48 | 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 | 101.00 | 348.00 | 449.00 | OK | |
| r-oldrel-macos-arm64 | 1.1.0 | 18.00 | 86.00 | 104.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 | 114.00 | 475.00 | 589.00 | OK |
Version: 1.1.0
Check: tests
Result: ERROR
Running ‘spelling.R’ [0s/0s]
Running ‘testthat.R’ [36s/29s]
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, 11: .self$network_to_cc(), TRUE)lapply(seq_len(cores), inner.do)
12: 2: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, FUN(X[[i]], ...) mc.silent = TRUE)
3: 13: lapply(X = S, FUN = FUN, ...)parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores,
verbose = (verbosity > 4)) 4:
doTryCatch(return(expr), name, parentenv, handler)14:
.self$do_with_inits(inits, Q, reinitialization_effort) 5:
tryCatchOne(expr, names, parentenv, handlers[[1L]])15:
.self$estim_ascend(reinitialization_effort, changing_effort) 6:
tryCatchList(expr, classes, parentenv, handlers)16:
private$BMobject$estimate() 7:
tryCatch(expr, error = function(e) {17: call <- conditionCall(e)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) if (!is.null(call)) {
if (identical(call[[1L]], quote(doTryCatch))) 18: call <- sys.call(-4L)eval(code, test_env) dcall <- deparse(call, nlines = 1L)
prefix <- paste("Error in", dcall, ": ")19: LONG <- 75Leval(code, test_env)
sm <- strsplit(conditionMessage(e), "\n")[[1L]]20: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")withCallingHandlers({ if (is.na(w)) eval(code, test_env) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], new_expectations <- the$test_expectations > starting_expectations type = "b") if (snapshot_skipped) { if (w > LONG) skip("On CRAN") prefix <- paste0(prefix, "\n ") } } else if (!new_expectations && skip_on_empty) { else prefix <- "Error : " skip_empty() msg <- paste0(prefix, conditionMessage(e), "\n") } .Internal(seterrmessage(msg[1L]))}, expectation = handle_expectation, packageNotFoundError = function(e) { if (!silent && isTRUE(getOption("show.error.messages"))) { if (on_cran()) { cat(msg, file = outFile) skip(paste0("{", e$package, "} is not installed.")) .Internal(printDeferredWarnings()) } }}, snapshot_on_cran = function(cnd) { invisible(structure(msg, class = "try-error", condition = e)) snapshot_skipped <<- TRUE}) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 8: error = handle_error, interrupt = handle_interrupt)try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
21: 10: doTryCatch(return(expr), name, parentenv, handler)FUN(X[[i]], ...)
22: 11: tryCatchOne(expr, names, parentenv, handlers[[1L]])lapply(seq_len(cores), inner.do)
23: 12: tryCatchList(expr, classes, parentenv, handlers)parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE,
mc.silent = TRUE)24:
tryCatch(withCallingHandlers({13: eval(code, test_env)parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, new_expectations <- the$test_expectations > starting_expectations verbose = (verbosity > 4)) if (snapshot_skipped) {
skip("On CRAN")14: }.self$do_with_inits(inits, Q, reinitialization_effort) else if (!new_expectations && skip_on_empty) {
skip_empty()15: }.self$estim_ascend(reinitialization_effort, changing_effort)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {16: skip(paste0("{", e$package, "} is not installed."))private$BMobject$estimate() }
}, snapshot_on_cran = function(cnd) {17: snapshot_skipped <<- TRUEmySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)18:
eval(code, test_env)25:
doWithOneRestart(return(expr), restart)19:
eval(code, test_env)26:
withOneRestart(expr, restarts[[1L]])20:
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 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) })
22:
28: tryCatchOne(expr, names, parentenv, handlers[[1L]])test_code(code, parent.frame())
23: 29: tryCatchList(expr, classes, parentenv, handlers)test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate",
{24: sampler_undirected_cov$rNetwork(store = TRUE)tryCatch(withCallingHandlers({ eval(code, test_env) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, new_expectations <- the$test_expectations > starting_expectations "bernoulli", FALSE, covarList = covarList_undirected) if (snapshot_skipped) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, skip("On CRAN") plot = FALSE)) } mySBM_sbm$setModel(Q) else if (!new_expectations && skip_on_empty) { net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, skip_empty() covariates = covarList_undirected) } 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_undirected) } mySBM_missSBM$doVEM()}, snapshot_on_cran = function(cnd) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), snapshot_skipped <<- TRUE 0.05) 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), error = handle_fatal) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik),
0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), 25: doWithOneRestart(return(expr), restart) 0.1)
expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), 26: 0.1)withOneRestart(expr, restarts[[1L]]) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships),
0.85)27: })withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)30: new_expectations <- the$test_expectations > starting_expectationseval(code, test_env) if (snapshot_skipped) {
skip("On CRAN") }31: else if (!new_expectations && skip_on_empty) { skip_empty()eval(code, test_env)
}32: }, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {withCallingHandlers({ skip(paste0("{", e$package, "} is not installed.")) eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, snapshot_on_cran = function(cnd) { if (snapshot_skipped) { 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."))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, one covariate", }, skip = handle_skip, warning = handle_warning, message = handle_message, { error = handle_error, interrupt = handle_interrupt) sampler_undirected_cov$rNetwork(store = TRUE)
mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, 33: "bernoulli", FALSE, covarList = covarList_undirected)doTryCatch(return(expr), name, parentenv, handler) mySBM_sbm$optimize(estimOptions = list(verbosity = 0,
plot = FALSE))34: mySBM_sbm$setModel(Q)tryCatchOne(expr, names, parentenv, handlers[[1L]]) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData,
covariates = covarList_undirected)35: cls <- net$clustering(1:(2 * Q))tryCatchList(expr, classes, parentenv, handlers) cl <- cls[[Q]]
mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, 36: clusterInit = cl, covarList = covarList_undirected)tryCatch(withCallingHandlers({ mySBM_missSBM$doVEM() eval(code, test_env) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), new_expectations <- the$test_expectations > starting_expectations 0.05) 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.01) skip_empty() expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), } 0.1)}, expectation = handle_expectation, packageNotFoundError = function(e) { expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), if (on_cran()) { 0.1) skip(paste0("{", e$package, "} is not installed.")) } expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), }, snapshot_on_cran = function(cnd) { 0.85) 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)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")}, skip = handle_skip, warning = handle_warning, message = handle_message, snapshot_skipped <<- TRUE 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: doTryCatch(return(expr), name, parentenv, handler) end_test = function() {
})
34: 40: tryCatchOne(expr, names, parentenv, handlers[[1L]])test_code(code = exprs, env = env, reporter = get_reporter() %||%
StopReporter$new())
35: 41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, tryCatchList(expr, classes, parentenv, handlers) error_call = error_call)
42: 36: tryCatch(withCallingHandlers({ eval(code, test_env)FUN(X[[i]], ...) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) { skip("On CRAN")43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, } else if (!new_expectations && skip_on_empty) { skip_empty() } error_call = error_call)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {44: skip(paste0("{", e$package, "} is not installed."))doTryCatch(return(expr), name, parentenv, handler) }
}, snapshot_on_cran = function(cnd) {45: snapshot_skipped <<- TRUEtryCatchOne(expr, names, parentenv, handlers[[1L]]) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 46: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)tryCatchList(expr, classes, parentenv, handlers)
37: 47: doWithOneRestart(return(expr), restart)tryCatch(code, testthat_abort_reporter = function(cnd) {
cat(conditionMessage(cnd), "\n")38: NULLwithOneRestart(expr, restarts[[1L]])})
39:
withRestarts(tryCatch(withCallingHandlers({48: eval(code, test_env)with_reporter(reporters$multi, lapply(test_paths, test_one_file, new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") env = env, desc = desc, shuffle = shuffle, error_call = error_call)) } else if (!new_expectations && skip_on_empty) {
skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {49: test_files_serial(test_dir = test_dir, test_package = test_package, skip(paste0("{", e$package, "} is not installed.")) } test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") 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)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal),
end_test = function() {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, 40: test_code(code = exprs, env = env, reporter = get_reporter() %||% load_package = load_package, parallel = parallel, shuffle = shuffle)
StopReporter$new())
51: test_dir("testthat", package = package, reporter = reporter, 41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, ..., load_package = "installed") error_call = error_call)
42: 52: FUN(X[[i]], ...)
test_check("missSBM")
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, An irrecoverable exception occurred. R is aborting now ...
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) {
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, call <- conditionCall(e) .self$network_to_cc(), TRUE) if (!is.null(call)) {
if (identical(call[[1L]], quote(doTryCatch))) 2: FUN(X[[i]], ...) call <- sys.call(-4L)
dcall <- deparse(call, nlines = 1L) 3: lapply(X = S, FUN = FUN, ...) prefix <- paste("Error in", dcall, ": ")
4: LONG <- 75LdoTryCatch(return(expr), name, parentenv, handler) sm <- strsplit(conditionMessage(e), "\n")[[1L]]
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") 5: if (is.na(w)) tryCatchOne(expr, names, parentenv, handlers[[1L]])
w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) 6: tryCatchList(expr, classes, parentenv, handlers) prefix <- paste0(prefix, "\n ") }
7: else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n")tryCatch(expr, error = function(e) { call <- conditionCall(e) .Internal(seterrmessage(msg[1L])) if (!is.null(call)) { if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) if (identical(call[[1L]], quote(doTryCatch))) .Internal(printDeferredWarnings()) } call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) invisible(structure(msg, class = "try-error", condition = e))}) prefix <- paste("Error in", dcall, ": ") LONG <- 75L
8: sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
if (is.na(w)) 9: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b")sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) if (w > LONG) prefix <- paste0(prefix, "\n ")
} else prefix <- "Error : "10: FUN(X[[i]], ...) msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L]))
if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile)11: .Internal(printDeferredWarnings()) }lapply(seq_len(cores), inner.do) invisible(structure(msg, class = "try-error", condition = e))
})12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE,
8: mc.silent = TRUE)
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) verbose = (verbosity > 4))
10: 14: FUN(X[[i]], ...).self$do_with_inits(inits, Q, reinitialization_effort)
11:
lapply(seq_len(cores), inner.do)15: .self$estim_ascend(reinitialization_effort, changing_effort)
16: 12: private$BMobject$estimate()
parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, 17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mc.silent = TRUE)
18:
eval(code, test_env)
13: 19: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, eval(code, test_env) verbose = (verbosity > 4))
20:
14: withCallingHandlers({ eval(code, test_env).self$do_with_inits(inits, Q, reinitialization_effort)
new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {15: .self$estim_ascend(reinitialization_effort, changing_effort) skip("On CRAN") }
16: else if (!new_expectations && skip_on_empty) {private$BMobject$estimate()
skip_empty()17: }mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))18: eval(code, test_env) }}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")19: eval(code, test_env)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
20:
withCallingHandlers({21: doTryCatch(return(expr), name, parentenv, handler) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations22: if (snapshot_skipped) { skip("On CRAN")tryCatchOne(expr, names, parentenv, handlers[[1L]])
} else if (!new_expectations && skip_on_empty) {23: skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) {tryCatchList(expr, classes, parentenv, handlers) if (on_cran()) {
24: skip(paste0("{", e$package, "} is not installed."))tryCatch(withCallingHandlers({ } eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE if (snapshot_skipped) { invokeRestart("muffle_cran_snapshot") skip("On CRAN")}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt) else if (!new_expectations && skip_on_empty) { skip_empty()
}}, expectation = handle_expectation, packageNotFoundError = function(e) {21: doTryCatch(return(expr), name, parentenv, handler) if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))
}}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE22: 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)
25: 23: doWithOneRestart(return(expr), restart)tryCatchList(expr, classes, parentenv, handlers)
26: withOneRestart(expr, restarts[[1L]])24:
27: tryCatch(withCallingHandlers({withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { if (snapshot_skipped) { skip("On CRAN") skip("On CRAN") } } else if (!new_expectations && skip_on_empty) { skip_empty() else if (!new_expectations && skip_on_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 invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, })
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)28: test_code(code, parent.frame())
25:
29: doWithOneRestart(return(expr), restart)test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", {
26: sampler_directed_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, withOneRestart(expr, restarts[[1L]]) "bernoulli", TRUE, covarList = covarList_directed)
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))27: withRestarts(tryCatch(withCallingHandlers({ mySBM_sbm$setModel(Q) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, if (snapshot_skipped) { 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, }}, expectation = handle_expectation, packageNotFoundError = function(e) { clusterInit = cl, covarList = covarList_directed) mySBM_missSBM$doVEM(trace = TRUE) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), if (on_cran()) { 0.1) skip(paste0("{", e$package, "} is not installed.")) } expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), }, snapshot_on_cran = function(cnd) { 0.8) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), snapshot_skipped <<- TRUE 0.05) invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), 0.1) end_test = function() { }) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), 0.85)
})
28: test_code(code, parent.frame())30: eval(code, test_env)
29:
test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", {31: eval(code, test_env) sampler_directed_cov$rNetwork(store = TRUE)
32: mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, "bernoulli", TRUE, covarList = covarList_directed)withCallingHandlers({ eval(code, test_env) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) new_expectations <- the$test_expectations > starting_expectations mySBM_sbm$setModel(Q) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, if (snapshot_skipped) { covariates = covarList_directed) cls <- net$clustering(1:(2 * Q)) skip("On CRAN") cl <- cls[[Q]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, } else if (!new_expectations && skip_on_empty) { clusterInit = cl, covarList = covarList_directed) skip_empty() } mySBM_missSBM$doVEM(trace = TRUE) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), }, expectation = handle_expectation, packageNotFoundError = function(e) { 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) 0.8) } expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), }, snapshot_on_cran = function(cnd) { 0.05) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), }, skip = handle_skip, warning = handle_warning, message = handle_message, 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), error = handle_error, interrupt = handle_interrupt)
0.85)33: doTryCatch(return(expr), name, parentenv, handler)
34: })tryCatchOne(expr, names, parentenv, handlers[[1L]])
30: 35: 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) 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() } }}, 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")}, snapshot_on_cran = function(cnd) {}, skip = handle_skip, warning = handle_warning, message = handle_message, snapshot_skipped <<- TRUE error = handle_error, interrupt = handle_interrupt), error = handle_fatal) invokeRestart("muffle_cran_snapshot")
37: }, skip = handle_skip, warning = handle_warning, message = handle_message, doWithOneRestart(return(expr), restart) error = handle_error, interrupt = handle_interrupt)
38: 33: doTryCatch(return(expr), name, parentenv, handler)withOneRestart(expr, restarts[[1L]])
34:
39: tryCatchOne(expr, names, parentenv, handlers[[1L]])withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations35: if (snapshot_skipped) { skip("On CRAN")tryCatchList(expr, classes, parentenv, handlers)
}36: tryCatch(withCallingHandlers({ else if (!new_expectations && skip_on_empty) { eval(code, test_env) skip_empty() new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) { 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()) { snapshot_skipped <<- TRUE skip(paste0("{", e$package, "} is not installed.")) } invokeRestart("muffle_cran_snapshot")}, snapshot_on_cran = function(cnd) { 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) })
37: 40: doWithOneRestart(return(expr), restart)test_code(code = exprs, env = env, reporter = get_reporter() %||%
38: StopReporter$new())
withOneRestart(expr, restarts[[1L]])
41: 39: source_file(path, env = env(env), desc = desc, shuffle = shuffle, withRestarts(tryCatch(withCallingHandlers({ error_call = error_call) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {42: skip("On CRAN")FUN(X[[i]], ...) }
else if (!new_expectations && skip_on_empty) {43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, skip_empty() error_call = error_call) }}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))44: }doTryCatch(return(expr), name, parentenv, handler)}, snapshot_on_cran = function(cnd) {
45: snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")tryCatchOne(expr, names, parentenv, handlers[[1L]])}, skip = handle_skip, warning = handle_warning, message = handle_message,
46: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), tryCatchList(expr, classes, parentenv, handlers) end_test = function() { })
47:
40: tryCatch(code, testthat_abort_reporter = function(cnd) {test_code(code = exprs, env = env, reporter = get_reporter() %||% cat(conditionMessage(cnd), "\n") StopReporter$new()) NULL
})41:
source_file(path, env = env(env), desc = desc, shuffle = shuffle, 48: error_call = error_call)with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
42:
49: FUN(X[[i]], ...)
test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, 43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, error_call = error_call) desc = desc, load_package = load_package, shuffle = shuffle,
error_call = error_call)44:
doTryCatch(return(expr), name, parentenv, handler)50: test_files(test_dir = path, test_paths = test_paths, test_package = package,
reporter = reporter, load_helpers = load_helpers, env = env, 45: stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, tryCatchOne(expr, names, parentenv, handlers[[1L]]) load_package = load_package, parallel = parallel, shuffle = shuffle)
46: 51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")tryCatchList(expr, classes, parentenv, handlers)
47: 52: tryCatch(code, testthat_abort_reporter = function(cnd) {test_check("missSBM") cat(conditionMessage(cnd), "\n") NULL
An irrecoverable exception occurred. R is aborting now ...
})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-with-covariates-46.R
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10: FUN(X[[i]], ...)
11: lapply(seq_len(cores), inner.do)
12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)
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()
Traceback:
1: }dispatcher(membership_name, membership_init$to_cc(), model_name, }, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) } .self$network_to_cc(), TRUE)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE 2: invokeRestart("muffle_cran_snapshot")FUN(X[[i]], ...)}, skip = handle_skip, warning = handle_warning, message = handle_message,
3: error = handle_error, interrupt = handle_interrupt)lapply(X = S, FUN = FUN, ...)
21: 4: doTryCatch(return(expr), name, parentenv, handler)doTryCatch(return(expr), name, parentenv, handler)
22: 5: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatchOne(expr, names, parentenv, handlers[[1L]])
23: 6: tryCatchList(expr, classes, parentenv, handlers)tryCatchList(expr, classes, parentenv, handlers)
24: 7: tryCatch(withCallingHandlers({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) { LONG <- 75L if (on_cran()) { sm <- strsplit(conditionMessage(e), "\n")[[1L]] skip(paste0("{", e$package, "} is not installed.")) 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), error = handle_fatal) prefix <- paste0(prefix, "\n ")
}25: else prefix <- "Error : "doWithOneRestart(return(expr), restart) msg <- paste0(prefix, conditionMessage(e), "\n")
.Internal(seterrmessage(msg[1L]))26: if (!silent && isTRUE(getOption("show.error.messages"))) {withOneRestart(expr, restarts[[1L]]) cat(msg, file = outFile)
.Internal(printDeferredWarnings())27: }withRestarts(tryCatch(withCallingHandlers({ invisible(structure(msg, class = "try-error", condition = e)) eval(code, test_env)}) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) { 8: skip("On CRAN")try(lapply(X = S, FUN = FUN, ...), silent = TRUE) }
else if (!new_expectations && skip_on_empty) { skip_empty() 9: }sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {10: skip(paste0("{", e$package, "} is not installed."))FUN(X[[i]], ...) }
}, snapshot_on_cran = function(cnd) {11: snapshot_skipped <<- TRUElapply(seq_len(cores), inner.do) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 12: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() {parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, }) mc.silent = TRUE)
28: 13: test_code(code, parent.frame())parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores,
verbose = (verbosity > 4))
29: 14: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", .self$do_with_inits(inits, Q, reinitialization_effort) {
sampler_undirected_nocov$rNetwork(store = TRUE)15: mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, .self$estim_ascend(reinitialization_effort, changing_effort) "bernoulli", FALSE)
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, 16: plot = FALSE))private$BMobject$estimate() mySBM_sbm$setModel(3)
net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData)17: cl <- net$clustering(3)[[1]]mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net,
clusterInit = cl)18: mySBM_missSBM$doVEM()eval(code, test_env) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean),
0.05)19: expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), eval(code, test_env) 0.95)
expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 20: 0.01)withCallingHandlers({ expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), eval(code, test_env) 0.05) new_expectations <- the$test_expectations > starting_expectations expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), if (snapshot_skipped) { 0.95) skip("On CRAN") }) }
else if (!new_expectations && skip_on_empty) {30: skip_empty()eval(code, test_env) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {31: eval(code, test_env) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))32: }withCallingHandlers({}, snapshot_on_cran = function(cnd) { eval(code, test_env) snapshot_skipped <<- TRUE new_expectations <- the$test_expectations > starting_expectations invokeRestart("muffle_cran_snapshot") if (snapshot_skipped) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip("On CRAN") error = handle_error, interrupt = handle_interrupt) }
else if (!new_expectations && skip_on_empty) {21: doTryCatch(return(expr), name, parentenv, handler)
skip_empty()22: }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {23: skip(paste0("{", e$package, "} is not installed."))tryCatchList(expr, classes, parentenv, handlers) }
}, snapshot_on_cran = function(cnd) {24: snapshot_skipped <<- TRUEtryCatch(withCallingHandlers({ invokeRestart("muffle_cran_snapshot") eval(code, test_env)}, skip = handle_skip, warning = handle_warning, message = handle_message, new_expectations <- the$test_expectations > starting_expectations error = handle_error, interrupt = handle_interrupt) if (snapshot_skipped) {
skip("On CRAN")33: }doTryCatch(return(expr), name, parentenv, handler) else if (!new_expectations && skip_on_empty) {
skip_empty()34: }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {35: skip(paste0("{", e$package, "} is not installed.")) }tryCatchList(expr, classes, parentenv, handlers)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE36: invokeRestart("muffle_cran_snapshot")tryCatch(withCallingHandlers({}, skip = handle_skip, warning = handle_warning, message = handle_message, eval(code, test_env) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {25: skip("On CRAN")doWithOneRestart(return(expr), restart) }
26: withOneRestart(expr, restarts[[1L]])
else if (!new_expectations && skip_on_empty) {27: skip_empty()withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip("On CRAN") if (on_cran()) { } skip(paste0("{", e$package, "} is not installed.")) else if (!new_expectations && skip_on_empty) { } 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 <<- TRUE invokeRestart("muffle_cran_snapshot")doWithOneRestart(return(expr), restart)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 38: withOneRestart(expr, restarts[[1L]]) end_test = function() {
})39:
withRestarts(tryCatch(withCallingHandlers({28: eval(code, test_env)test_code(code, parent.frame()) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {29: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", skip("On CRAN") } { else if (!new_expectations && skip_on_empty) { skip_empty() sampler_undirected_nocov$rNetwork(store = TRUE) } mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, }, expectation = handle_expectation, packageNotFoundError = function(e) { "bernoulli", FALSE) if (on_cran()) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, skip(paste0("{", e$package, "} is not installed.")) plot = FALSE)) } mySBM_sbm$setModel(3)}, snapshot_on_cran = function(cnd) { net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) snapshot_skipped <<- TRUE cl <- net$clustering(3)[[1]] invokeRestart("muffle_cran_snapshot") mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, }, skip = handle_skip, warning = handle_warning, message = handle_message, clusterInit = cl) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), mySBM_missSBM$doVEM() end_test = function() { expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), }) 0.05)
expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 40: 0.95)test_code(code = exprs, env = env, reporter = get_reporter() %||% expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), StopReporter$new()) 0.01)
expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), 41: 0.05)source_file(path, env = env(env), desc = desc, shuffle = shuffle, expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), error_call = error_call) 0.95)
})42:
FUN(X[[i]], ...)30:
eval(code, test_env)43:
lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, 31: error_call = error_call)eval(code, test_env)
44: 32: doTryCatch(return(expr), name, parentenv, handler)withCallingHandlers({
eval(code, test_env)45: new_expectations <- the$test_expectations > starting_expectationstryCatchOne(expr, names, parentenv, handlers[[1L]]) if (snapshot_skipped) {
skip("On CRAN")46: }tryCatchList(expr, classes, parentenv, handlers) else if (!new_expectations && skip_on_empty) {
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)49:
test_files_serial(test_dir = test_dir, test_package = test_package, 33: test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, doTryCatch(return(expr), name, parentenv, handler) env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
desc = desc, load_package = load_package, shuffle = shuffle, 34: error_call = error_call)tryCatchOne(expr, names, parentenv, handlers[[1L]])
50: 35: test_files(test_dir = path, test_paths = test_paths, test_package = package, tryCatchList(expr, classes, parentenv, handlers) reporter = reporter, load_helpers = load_helpers, env = env,
36: stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, tryCatch(withCallingHandlers({ eval(code, test_env) load_package = load_package, parallel = parallel, shuffle = shuffle) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {51: skip("On CRAN")test_dir("testthat", package = package, reporter = reporter, } ..., load_package = "installed") else if (!new_expectations && skip_on_empty) { skip_empty() }
}, expectation = handle_expectation, packageNotFoundError = function(e) {52: if (on_cran()) {test_check("missSBM") skip(paste0("{", e$package, "} is not installed."))
}}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")An irrecoverable exception occurred. R is aborting now ...
}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
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-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() }
Traceback:
}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { 1: skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) {dispatcher(membership_name, membership_init$to_cc(), model_name, snapshot_skipped <<- TRUE .self$network_to_cc(), TRUE) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 2: error = handle_error, interrupt = handle_interrupt)FUN(X[[i]], ...)
21: doTryCatch(return(expr), name, parentenv, handler) 3:
lapply(X = S, FUN = FUN, ...)22:
tryCatchOne(expr, names, parentenv, handlers[[1L]]) 4: doTryCatch(return(expr), name, parentenv, handler)
23:
tryCatchList(expr, classes, parentenv, handlers) 5:
tryCatchOne(expr, names, parentenv, handlers[[1L]])24:
tryCatch(withCallingHandlers({ 6: eval(code, test_env)tryCatchList(expr, classes, parentenv, handlers) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) { 7: tryCatch(expr, error = function(e) { skip("On CRAN") call <- conditionCall(e) } if (!is.null(call)) { else if (!new_expectations && skip_on_empty) { if (identical(call[[1L]], quote(doTryCatch))) skip_empty() call <- sys.call(-4L) } dcall <- deparse(call, nlines = 1L)}, expectation = handle_expectation, packageNotFoundError = function(e) { prefix <- paste("Error in", dcall, ": ") if (on_cran()) { LONG <- 75L skip(paste0("{", e$package, "} is not installed.")) sm <- strsplit(conditionMessage(e), "\n")[[1L]] }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") invokeRestart("muffle_cran_snapshot") if (is.na(w)) }, skip = handle_skip, warning = handle_warning, message = handle_message, w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], error = handle_error, interrupt = handle_interrupt), error = handle_fatal) type = "b")
if (w > LONG) 25: prefix <- paste0(prefix, "\n ")doWithOneRestart(return(expr), restart)
}26: else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L]))withOneRestart(expr, restarts[[1L]]) if (!silent && isTRUE(getOption("show.error.messages"))) {
cat(msg, file = outFile)27: withRestarts(tryCatch(withCallingHandlers({ .Internal(printDeferredWarnings()) } eval(code, test_env) invisible(structure(msg, class = "try-error", condition = e)) new_expectations <- the$test_expectations > starting_expectations}) if (snapshot_skipped) {
skip("On CRAN") 8: }try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
else if (!new_expectations && skip_on_empty) { 9: skip_empty()sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {10: if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))FUN(X[[i]], ...) }
11: }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUElapply(seq_len(cores), inner.do) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 12: end_test = function() {parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, }) mc.silent = TRUE)
28: 13: test_code(code, parent.frame())
parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 29: verbose = (verbosity > 4))test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate",
{14: sampler_directed_nocov$rNetwork(store = TRUE).self$do_with_inits(inits, Q, reinitialization_effort) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData,
"bernoulli", TRUE)15: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, .self$estim_ascend(reinitialization_effort, changing_effort) plot = FALSE))
mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData)16: cl <- net$clustering(3)[[1]]private$BMobject$estimate() mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData,
clusterInit = cl)17: mySBM_missSBM$doVEM()mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean),
0.1)18: expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), eval(code, test_env) 0.95)
19: expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), eval(code, test_env) 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean),
0.1)20: expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), withCallingHandlers({ 0.2) eval(code, test_env) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), new_expectations <- the$test_expectations > starting_expectations 0.95) if (snapshot_skipped) { }) skip("On CRAN")
}30: else if (!new_expectations && skip_on_empty) {eval(code, test_env) skip_empty()
31: }eval(code, test_env)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {32: skip(paste0("{", e$package, "} is not installed.")) }withCallingHandlers({}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE eval(code, test_env) invokeRestart("muffle_cran_snapshot") new_expectations <- the$test_expectations > starting_expectations}, skip = handle_skip, warning = handle_warning, message = handle_message, if (snapshot_skipped) { error = handle_error, interrupt = handle_interrupt) skip("On CRAN")
}21: else if (!new_expectations && skip_on_empty) {doTryCatch(return(expr), name, parentenv, handler)
22: skip_empty() }tryCatchOne(expr, names, parentenv, handlers[[1L]])
}, expectation = handle_expectation, packageNotFoundError = function(e) {23: if (on_cran()) {tryCatchList(expr, classes, parentenv, handlers)
skip(paste0("{", e$package, "} is not installed."))24: }tryCatch(withCallingHandlers({}, snapshot_on_cran = function(cnd) { eval(code, test_env) snapshot_skipped <<- TRUE new_expectations <- the$test_expectations > starting_expectations invokeRestart("muffle_cran_snapshot") if (snapshot_skipped) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip("On CRAN") error = handle_error, interrupt = handle_interrupt)
}33: else if (!new_expectations && skip_on_empty) {doTryCatch(return(expr), name, parentenv, handler) skip_empty()
}34: }, expectation = handle_expectation, packageNotFoundError = function(e) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))35: }tryCatchList(expr, classes, parentenv, handlers)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE36: invokeRestart("muffle_cran_snapshot")tryCatch(withCallingHandlers({}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) eval(code, test_env)
25: new_expectations <- the$test_expectations > starting_expectationsdoWithOneRestart(return(expr), restart) if (snapshot_skipped) {
skip("On CRAN")26: }withOneRestart(expr, restarts[[1L]]) else if (!new_expectations && skip_on_empty) {
skip_empty()27: }withRestarts(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 } else if (!new_expectations && skip_on_empty) { invokeRestart("muffle_cran_snapshot") skip_empty()}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {37: doWithOneRestart(return(expr), restart) skip(paste0("{", e$package, "} is not installed."))
}38: withOneRestart(expr, restarts[[1L]])}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE39: invokeRestart("muffle_cran_snapshot")withRestarts(tryCatch(withCallingHandlers({}, skip = handle_skip, warning = handle_warning, message = handle_message, eval(code, test_env) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), new_expectations <- the$test_expectations > starting_expectations end_test = function() { }) if (snapshot_skipped) {
skip("On CRAN") }28: else if (!new_expectations && skip_on_empty) {test_code(code, parent.frame()) skip_empty()
}29: }, expectation = handle_expectation, packageNotFoundError = function(e) {test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", if (on_cran()) { { skip(paste0("{", e$package, "} is not installed.")) sampler_directed_nocov$rNetwork(store = TRUE) } mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, }, snapshot_on_cran = function(cnd) { "bernoulli", TRUE) snapshot_skipped <<- TRUE mySBM_sbm$optimize(estimOptions = list(verbosity = 0, invokeRestart("muffle_cran_snapshot") plot = FALSE))}, skip = handle_skip, warning = handle_warning, message = handle_message, mySBM_sbm$setModel(3) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { 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()40: expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), test_code(code = exprs, env = env, reporter = get_reporter() %||% 0.1) StopReporter$new()) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships),
0.95)41: expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), source_file(path, env = env(env), desc = desc, shuffle = shuffle, 0.01) error_call = error_call) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), 0.1)
42: expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), 0.2)FUN(X[[i]], ...)
expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), 0.95)43: })lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
30: eval(code, test_env)44: doTryCatch(return(expr), name, parentenv, handler)
31: 45: eval(code, test_env)tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: 32: tryCatchList(expr, classes, parentenv, handlers)withCallingHandlers({
eval(code, test_env)47: new_expectations <- the$test_expectations > starting_expectationstryCatch(code, testthat_abort_reporter = function(cnd) { if (snapshot_skipped) { cat(conditionMessage(cnd), "\n") skip("On CRAN") NULL }}) else if (!new_expectations && skip_on_empty) {
skip_empty() }48: }, expectation = handle_expectation, packageNotFoundError = function(e) {with_reporter(reporters$multi, lapply(test_paths, test_one_file, if (on_cran()) { env = env, desc = desc, shuffle = shuffle, error_call = error_call)) skip(paste0("{", e$package, "} is not installed."))
}49: }, snapshot_on_cran = function(cnd) {test_files_serial(test_dir = test_dir, test_package = test_package, snapshot_skipped <<- TRUE test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, invokeRestart("muffle_cran_snapshot") env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, }, skip = handle_skip, warning = handle_warning, message = handle_message, desc = desc, load_package = load_package, shuffle = shuffle, error = handle_error, interrupt = handle_interrupt) error_call = error_call)
33: 50: doTryCatch(return(expr), name, parentenv, handler)test_files(test_dir = path, test_paths = test_paths, test_package = package,
reporter = reporter, load_helpers = load_helpers, env = env, 34: stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, tryCatchOne(expr, names, parentenv, handlers[[1L]]) load_package = load_package, parallel = parallel, shuffle = shuffle)
35: 51: tryCatchList(expr, classes, parentenv, handlers)test_dir("testthat", package = package, reporter = reporter,
36: ..., load_package = "installed")tryCatch(withCallingHandlers({ eval(code, test_env)
52: new_expectations <- the$test_expectations > starting_expectationstest_check("missSBM")
if (snapshot_skipped) {An irrecoverable exception occurred. R is aborting now ...
skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
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
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.