Running ‘spelling.R’ [0s/0s]
  Running ‘testthat.R’ [58s/73s]
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(spicy)
  > 
  > test_check("spicy")
  Frequency table: x
  
   Category   │ Values      Freq.    Percent 
  ────────────┼──────────────────────────────
   Valid      │ A               1       25.0 
              │ B               2       50.0 
              │ C               1       25.0 
  ────────────┼──────────────────────────────
   Total      │                 4      100.0 
  
  Class: character
  Data: x
  Frequency table: c("A", "B", "A")
  
   Category   │ Values      Freq.    Percent 
  ────────────┼──────────────────────────────
   Valid      │ A               2       66.7 
              │ B               1       33.3 
  ────────────┼──────────────────────────────
   Total      │                 3      100.0 
  
  Class: character
  Data: c("A", "B", "A")
  Frequency table: x
  
   Category   │ Values      Freq.    Percent 
  ────────────┼──────────────────────────────
   Valid      │ A               1       20.0 
              │ B               1       30.0 
              │ C               2       50.0 
  ────────────┼──────────────────────────────
   Total      │                 3      100.0 
  
  Class: character
  Data: df
  Weight: w (rescaled)
  Frequency table: c("A", "B", "B")
  
   Category   │ Values      Freq.    Percent    Cum. Percent 
  ────────────┼──────────────────────────────────────────────
   Valid      │ A               1       33.3            33.3 
              │ B               2       66.7           100.0 
  ────────────┼──────────────────────────────────────────────
   Total      │                 3      100.0           100.0 
  
  Class: character
  Data: c("A", "B", "B")
  Frequency table: x
  
   Category   │ Values      Freq.    Percent    Valid Percent    Cum. Percent 
  ────────────┼───────────────────────────────────────────────────────────────
   Valid      │ A               2       50.0             66.7            50.0 
              │ B               1       25.0             33.3            75.0 
   Missing    │ NA              1       25.0                            100.0 
  ────────────┼───────────────────────────────────────────────────────────────
   Total      │                 4      100.0            100.0           100.0 
  
   Category   │ Values      Cum. Valid Percent 
  ────────────┼────────────────────────────────
   Valid      │ A                         66.7 
              │ B                        100.0 
   Missing    │ NA                             
  ────────────┼────────────────────────────────
   Total      │                          100.0 
  
  Class: character
  Data: x
  Frequency table: x
  
   Category   │ Values      Freq.    Percent 
  ────────────┼──────────────────────────────
   Valid      │ A               0       16.7 
              │ B               1       33.3 
              │ C               2       50.0 
  ────────────┼──────────────────────────────
   Total      │                 3      100.0 
  
  Class: character
  Data: df
  Weight: w (rescaled)
  Frequency table: x
  
   Category   │ Values          Freq.    Percent    Valid Percent 
  ────────────┼───────────────────────────────────────────────────
   Valid      │ [1] Low             1       14.3             16.7 
              │ [2] Medium          2       28.6             33.3 
              │ [3] High            3       42.9             50.0 
   Missing    │ NA                  1       14.3                  
  ────────────┼───────────────────────────────────────────────────
   Total      │                     7      100.0            100.0 
  
  Label: Satisfaction level
  Class: haven_labelled, vctrs_vctr, double
  Data: x
  Continuous outcomes by sex
  
   Variable │ M (F)  M (M)  Δ (M - F)  95% CI LL  95% CI UL   p     R²   n  
  ──────────┼───────────────────────────────────────────────────────────────
   score    │ 49.58  49.04    -0.54      -3.35      2.28     .703  0.00  40 
  Continuous outcomes by sex
  
   Variable │ M (F)  M (M)  Δ (M - F)  95% CI LL  95% CI UL   p     R²   n  
  ──────────┼───────────────────────────────────────────────────────────────
   score    │ 49.46  49.16    -0.29      -3.24      2.65     .841  0.01  40 
  
  Note. Adjusted for age (proportional).
  Continuous outcomes by sex
  
   Variable │ M (F)  M (M)  Δ (M - F)  95% CI LL  95% CI UL   p     R²   n  
  ──────────┼───────────────────────────────────────────────────────────────
   score    │ 49.46  49.16    -0.29      -3.24      2.65     .841  0.01  40 
  
  Note. Adjusted for age (balanced).
  Continuous outcomes by sex
  
   Variable │ M (F)  M (M)  Δ (M - F)  95% CI LL  95% CI UL   p     R²   n  
  ──────────┼───────────────────────────────────────────────────────────────
   score    │ 49.39  51.48    2.09       -1.74      5.92     .276  0.05  40 
  
  Note. Adjusted for age, weight (proportional).
  mean_n(): Row means computed with min_valid = 1, regex = FALSE
  mean_n(): Ignored non-numeric columns: char
  Ordered factor(s) detected. Polynomial contrasts (the R default for `ordered()`) decompose the factor into orthogonal trend components: `.L` = linear, `.Q` = quadratic, `.C` = cubic, `^k` = degree k. Coefficients are trends across the ordered levels, NOT per-level effects against a reference.
  i To display per-level (treatment) effects, refit with `factor(x, ordered = FALSE)` or set `options(contrasts = c("contr.treatment", "contr.treatment"))`.
  This message is displayed once per session.
  Saving _problems/test-regression_dispatch_engines-439.R
  sum_n(): Row sums computed with min_valid = 1, regex = FALSE
  sum_n(): Ignored non-numeric columns: char
  Categorical table copied to clipboard.
  Categorical table by sex
  
   Variable          │ Female n  Female %  Male n  Male %  Total n  Total %   p   
  ───────────────────┼────────────────────────────────────────────────────────────
   smoking           │                                                       .713 
     No              │   475       78.4     451     79.3     926     78.8         
     Yes             │   131       21.6     118     20.7     249     21.2         
  ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
   education         │                                                       .344 
     Lower secondary │   134       21.6     127     21.9     261     21.8         
     Upper secondary │   290       46.8     249     42.9     539     44.9         
     Tertiary        │   196       31.6     204     35.2     400     33.3         
  
   Variable          │ Effect size 
  ───────────────────┼─────────────
   smoking           │     .01     
     No              │             
     Yes             │             
  ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌
   education         │     .04     
     Lower secondary │             
     Upper secondary │             
     Tertiary        │             
  
  Note. Phi: smoking; Cramer's V: education.
  Categorical table by sex
  
   Variable          │ Female n  Female %  Male n  Male %  Total n  Total %   p   
  ───────────────────┼────────────────────────────────────────────────────────────
   smoking           │                                                       .713 
     No              │   475       78.4     451     79.3     926     78.8         
     Yes             │   131       21.6     118     20.7     249     21.2         
  ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
   education         │                                                       .344 
     Lower secondary │   134       21.6     127     21.9     261     21.8         
     Upper secondary │   290       46.8     249     42.9     539     44.9         
     Tertiary        │   196       31.6     204     35.2     400     33.3         
  
   Variable          │ Cramer's V 
  ───────────────────┼────────────
   smoking           │    .01     
     No              │            
     Yes             │            
  ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌
   education         │    .04     
     Lower secondary │            
     Upper secondary │            
     Tertiary        │            
  
   *** caught segfault ***
  address 0x1e0, cause 'memory not mapped'
  
  Traceback:
   1: zip::unzip(zipfile = file, exdir = folder)
   2: unpack_folder(file = path, folder = package_dir)
   3: read_docx()
   4: flextable::save_as_docx(ft, path = word_path)
   5: table_categorical(sochealth, "smoking", "education", output = "word",     word_path = tmp_docx)
   6: eval(code, test_env)
   7: eval(code, test_env)
   8: 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)
   9: doTryCatch(return(expr), name, parentenv, handler)
  10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  11: tryCatchList(expr, classes, parentenv, handlers)
  12: 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)
  13: doWithOneRestart(return(expr), restart)
  14: withOneRestart(expr, restarts[[1L]])
  15: 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() {    })
  16: test_code(code, parent.frame())
  17: test_that("table_categorical grouped word and clipboard outputs work",     {        skip_if_not_installed("flextable")        skip_if_not_installed("officer")        skip_if_not_installed("clipr")        tmp_docx <- tempfile(fileext = ".docx")        on.exit(unlink(tmp_docx), add = TRUE)        path <- table_categorical(sochealth, "smoking", "education",             output = "word", word_path = tmp_docx)        expect_identical(path, invisible(tmp_docx))        expect_true(file.exists(tmp_docx))        clip_text <- NULL        ns <- asNamespace("clipr")        old_write <- get("write_clip", envir = ns)        unlockBinding("write_clip", ns)        assign("write_clip", function(x, ...) {            clip_text <<- x            invisible(NULL)        }, envir = ns)        lockBinding("write_clip", ns)        on.exit({            unlockBinding("write_clip", ns)            assign("write_clip", old_write, envir = ns)            lockBinding("write_clip", ns)        }, add = TRUE)        txt <- table_categorical(sochealth, "smoking", "education",             output = "clipboard", assoc_ci = TRUE)        expect_type(txt, "character")        expect_match(clip_text, "Cramer's V")        expect_match(clip_text, "CI lower")    })
  18: eval(code, test_env)
  19: eval(code, test_env)
  20: withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt)
  21: doTryCatch(return(expr), name, parentenv, handler)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: tryCatchList(expr, classes, parentenv, handlers)
  24: tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
  25: doWithOneRestart(return(expr), restart)
  26: withOneRestart(expr, restarts[[1L]])
  27: withRestarts(tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal),     end_test = function() {    })
  28: test_code(code = exprs, env = env, reporter = get_reporter() %||%     StopReporter$new())
  29: source_file(path, env = env(env), desc = desc, shuffle = shuffle,     error_call = error_call)
  30: FUN(X[[i]], ...)
  31: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle,     error_call = error_call)
  32: doTryCatch(return(expr), name, parentenv, handler)
  33: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  34: tryCatchList(expr, classes, parentenv, handlers)
  35: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  36: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, desc = desc, shuffle = shuffle, error_call = error_call))
  37: 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)
  38: 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)
  39: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  40: test_check("spicy")
  An irrecoverable exception occurred. R is aborting now ...
  Segmentation fault