- using R version 4.5.3 (2026-03-11)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
gcc-15 (Debian 15.2.0-14) 15.2.0
GNU Fortran (Debian 15.2.0-14) 15.2.0
- running under: Debian GNU/Linux forky/sid
- using session charset: UTF-8
- checking for file ‘agregR/DESCRIPTION’ ... OK
- checking extension type ... Package
- this is package ‘agregR’ version ‘1.0.3’
- package encoding: UTF-8
- checking package namespace information ... OK
- checking package dependencies ... INFO
Package suggested but not available for checking: ‘cmdstanr’
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for executable files ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking whether package ‘agregR’ can be installed ... OK
See the install log for details.
- checking package directory ... OK
- checking for future file timestamps ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... [3s/3s] OK
- checking whether the package can be loaded with stated dependencies ... [2s/2s] OK
- checking whether the package can be unloaded cleanly ... [2s/2s] OK
- checking whether the namespace can be loaded with stated dependencies ... [2s/3s] OK
- checking whether the namespace can be unloaded cleanly ... [3s/4s] OK
- checking loading without being on the library search path ... [3s/3s] OK
- checking use of S3 registration ... OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... [14s/20s] OK
- checking Rd files ... [0s/0s] OK
- checking Rd metadata ... OK
- checking Rd line widths ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking contents of ‘data’ directory ... OK
- checking data for non-ASCII characters ... [2s/3s] OK
- checking LazyData ... OK
- checking data for ASCII and uncompressed saves ... OK
- checking line endings in shell scripts ... OK
- checking line endings in C/C++/Fortran sources/headers ... OK
- checking line endings in Makefiles ... OK
- checking compilation flags in Makevars ... OK
- checking for GNU extensions in Makefiles ... OK
- checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
- checking use of PKG_*FLAGS in Makefiles ... OK
- checking use of SHLIB_OPENMP_*FLAGS in Makefiles ... OK
- checking pragmas in C/C++ headers and code ... OK
- checking compilation flags used ... OK
- checking compiled code ... OK
- checking examples ... [3s/4s] OK
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [8s/11s] ERROR
Running ‘testthat.R’ [8s/11s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(agregR)
Loading required package: ggdist
>
> test_check("agregR")
-- Estimando intenção de votos para: "Lula" --
-- Estimando intenção de votos para: "Lula" --
-- Estimando intenção de votos para: "Lula" --
-- Estimando intenção de votos para: "Bolsonaro" --
! Para fazer a análise retrospectiva, este modelo depende dos resultados da eleição. Ele usa esses resultados para calcular vieses precisos, auxiliando o diagnóstico dos outros modelos.
! Atualizaremos os dados assim que estiverem disponíveis.
-- Estimando intenção de votos para: "Lula" --
*** caught segfault ***
address (nil), cause 'memory not mapped'
Traceback:
1: grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, resolveHJust(x$just, x$hjust), resolveVJust(x$just, x$vjust), x$rot, x$check.overlap)
2: drawDetails.text(x, recording = FALSE)
3: drawDetails(x, recording = FALSE)
4: drawGrob(x)
5: recordGraphics(drawGrob(x), list(x = x), getNamespace("grid"))
6: grid.draw.grob(x$children[[i]], recording = FALSE)
7: grid.draw(x$children[[i]], recording = FALSE)
8: drawGTree(x)
9: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
10: grid.draw.gTree(x$children[[i]], recording = FALSE)
11: grid.draw(x$children[[i]], recording = FALSE)
12: drawGTree(x)
13: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
14: grid.draw.gTree(x$children[[i]], recording = FALSE)
15: grid.draw(x$children[[i]], recording = FALSE)
16: drawGTree(x)
17: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
18: grid.draw.gTree(gtable)
19: grid.draw(gtable)
20: `print.ggplot2::ggplot`(x)
21: print(x)
22: `grid.draw.ggplot2::ggplot`(X[[i]], ...)
23: FUN(X[[i]], ...)
24: lapply(plot, grid.draw)
25: ggsave(arquivo, p, device = agg_png, width = config_grafico$graf_agregador$largura, height = config_grafico$graf_agregador$altura, units = config_grafico$graf_agregador$unidade, dpi = config_grafico$graf_agregador$dpi)
26: grafico_priori_posteriori(bd_naive, candidaturas = "Lula", tipo = "Percentual", salvar = TRUE, dir_saida = tmp)
27: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
28: suppressWarnings(grafico_priori_posteriori(bd_naive, candidaturas = "Lula", tipo = "Percentual", salvar = TRUE, dir_saida = tmp))
29: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
30: withCallingHandlers(expr, condition = function(cnd) { if (!is.null(matched) || !matches(cnd)) { return() } if (can_entrace(cnd)) { cnd <- cnd_entrace(cnd) } matched <<- cnd if (inherits(cnd, "message") || inherits(cnd, "warning")) { cnd_muffle(cnd) } else if (inherits(cnd, "error") || inherits(cnd, "skip")) { return_from(tl, cnd) }})
31: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), ...)
32: quasi_capture(enquo(object), label, capture_matching_condition, matches = matcher)
33: expect_condition_matching_("message", { { object }}, regexp = regexp, class = class, ..., inherit = inherit, info = info, label = label)
34: expect_message(suppressWarnings(grafico_priori_posteriori(bd_naive, candidaturas = "Lula", tipo = "Percentual", salvar = TRUE, dir_saida = tmp)), "Gráfico salvo")
35: eval(code, test_env)
36: eval(code, test_env)
37: 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)
38: doTryCatch(return(expr), name, parentenv, handler)
39: tryCatchOne(expr, names, parentenv, handlers[[1L]])
40: tryCatchList(expr, classes, parentenv, handlers)
41: 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)
42: doWithOneRestart(return(expr), restart)
43: withOneRestart(expr, restarts[[1L]])
44: 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() { })
45: test_code(code, parent.frame())
46: test_that("grafico_priori_posteriori salva arquivos corretamente", { amostras <- data.frame(`mu[1]` = rnorm(10), check.names = FALSE) bd_naive <- list(nome_modelo = "Naive", votos_estimados = tibble::tibble(turno = 1, dia = as.Date("2025-01-01"), pesquisa_id = "1", instituto = "Datafolha"), modelo_bruto = list(Lula = amostras)) tmp <- tempdir() expect_message(suppressWarnings(grafico_priori_posteriori(bd_naive, candidaturas = "Lula", tipo = "Percentual", salvar = TRUE, dir_saida = tmp)), "Gráfico salvo") })
47: eval(code, test_env)
48: eval(code, test_env)
49: 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)
50: doTryCatch(return(expr), name, parentenv, handler)
51: tryCatchOne(expr, names, parentenv, handlers[[1L]])
52: tryCatchList(expr, classes, parentenv, handlers)
53: 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)
54: doWithOneRestart(return(expr), restart)
55: withOneRestart(expr, restarts[[1L]])
56: 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() { })
57: test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())
58: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)
59: FUN(X[[i]], ...)
60: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
61: doTryCatch(return(expr), name, parentenv, handler)
62: tryCatchOne(expr, names, parentenv, handlers[[1L]])
63: tryCatchList(expr, classes, parentenv, handlers)
64: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
65: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
66: 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)
67: 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)
68: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
69: test_check("agregR")
An irrecoverable exception occurred. R is aborting now ...
Segmentation fault
- checking PDF version of manual ... [4s/7s] OK
- checking HTML version of manual ... [1s/1s] OK
- checking for non-standard things in the check directory ... OK
- DONE
Status: 1 ERROR