Running ‘testthat.R’ [5s/6s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(whomds)
  Loading required package: psych
  
  Attaching package: 'psych'
  
  The following object is masked from 'package:testthat':
  
      describe
  
  Thank you for using whomds. To learn more about the WHO Model Disability Survey (MDS) and for contact information, go to https://www.who.int/health-topics/disability
  > 
  > test_check("whomds")
  
   *** caught segfault ***
  address 0xb6, cause 'memory not mapped'
  
  Traceback:
   1: .Call(dplyr_mask_eval_all_summarise, quo, private)
   2: eval()
   3: mask$eval_all_summarise(quo)
   4: FUN(X[[i]], ...)
   5: lapply(.x, .f, ...)
   6: map(quosures, summarise_eval_one, mask = mask)
   7: withCallingHandlers({    for (i in seq_along(dots)) {        poke_error_context(dots, i, mask = mask)        context_poke("column", old_current_column)        dot <- dots[[i]]        dot <- expand_pick(dot, mask)        quosures <- expand_across(dot)        quosures_results <- map(quosures, summarise_eval_one,             mask = mask)        for (k in seq_along(quosures)) {            quo <- quosures[[k]]            quo_data <- attr(quo, "dplyr:::data")            quo_result <- quosures_results[[k]]            if (is.null(quo_result)) {                next            }            types_k <- quo_result$types            chunks_k <- quo_result$chunks            results_k <- quo_result$results            if (!quo_data$is_named && is.data.frame(types_k)) {                chunks_extracted <- .Call(dplyr_extract_chunks,                   chunks_k, types_k)                types_k_names <- names(types_k)                for (j in seq_along(chunks_extracted)) {                  mask$add_one(name = types_k_names[j], chunks = chunks_extracted[[j]],                     result = results_k[[j]])                }                chunks <- append(chunks, chunks_extracted)                types <- append(types, as.list(types_k))                results <- append(results, results_k)                out_names <- c(out_names, types_k_names)            }            else {                name <- dplyr_quosure_name(quo_data)                mask$add_one(name = name, chunks = chunks_k,                   result = results_k)                chunks <- append(chunks, list(chunks_k))                types <- append(types, list(types_k))                results <- append(results, list(results_k))                out_names <- c(out_names, name)            }        }    }    if (verb == "summarise") {        .Call(dplyr_summarise_check_all_size_one, chunks, n_groups)        group_sizes <- NULL    }    else {        group_sizes <- .Call(dplyr_reframe_recycle_horizontally_in_place,             chunks, results, n_groups)        for (i in seq_along(chunks)) {            if (is.null(results[[i]])) {                results[[i]] <- vec_c(!!!chunks[[i]], .ptype = types[[i]])            }        }    }}, error = function(cnd) {    if (inherits(cnd, "dplyr:::reframe_incompatible_size")) {        action <- "recycle"        i <- cnd$dplyr_error_data$index_expression    }    else if (inherits(cnd, "dplyr:::summarise_incompatible_size")) {        action <- "compute"        i <- cnd$dplyr_error_data$index_expression    }    else {        action <- "compute"        i <- i    }    handler <- dplyr_error_handler(dots = dots, mask = mask,         bullets = summarise_bullets, error_call = error_call,         action = action)    handler(cnd)}, warning = dplyr_warning_handler(state = warnings_state, mask = mask,     error_call = error_call))
   8: summarise_cols(.data, dplyr_quosures(...), by, "summarise")
   9: summarise.grouped_df(.data$variables, !!!.dots, .groups = .groups)
  10: dplyr::summarise(.data$variables, !!!.dots, .groups = .groups)
  11: summarise.grouped_svy(., prop = survey_mean(na.rm = TRUE))
  12: summarize(., prop = survey_mean(na.rm = TRUE))
  13: mutate(., prop = prop * 100)
  14: des %>% group_by_at(c(by_vars, "item", "resp")) %>% summarize(prop = survey_mean(na.rm = TRUE)) %>%     mutate(prop = prop * 100)
  15: table_weightedpct(df_adults, vars_ids = c("PSU", "HHID"), vars_strata = "strata",     vars_weights = "weight", formula_vars = formula_vars, formula_vars_levels = formula_vars_levels,     by_vars = by_vars)
  16: eval(code, test_env)
  17: eval(code, test_env)
  18: 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)
  19: doTryCatch(return(expr), name, parentenv, handler)
  20: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  21: tryCatchList(expr, classes, parentenv, handlers)
  22: 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)
  23: doWithOneRestart(return(expr), restart)
  24: withOneRestart(expr, restarts[[1L]])
  25: 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() {    })
  26: test_code(code, parent.frame())
  27: test_that("Dimensions as multiple of formula_vars, levels, and by_vars",     {        formula_vars <- paste0("EF", 1:10)        formula_vars_levels <- 1:5        by_vars <- "sex"        tab <- table_weightedpct(df_adults, vars_ids = c("PSU",             "HHID"), vars_strata = "strata", vars_weights = "weight",             formula_vars = formula_vars, formula_vars_levels = formula_vars_levels,             by_vars = by_vars)        expect_equal(nrow(tab), length(formula_vars) * length(formula_vars_levels) *             length(levels(dplyr::pull(df_adults, by_vars))))        expect_equal(ncol(tab), 4)    })
  28: eval(code, test_env)
  29: eval(code, test_env)
  30: 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)
  31: doTryCatch(return(expr), name, parentenv, handler)
  32: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  33: tryCatchList(expr, classes, parentenv, handlers)
  34: 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)
  35: doWithOneRestart(return(expr), restart)
  36: withOneRestart(expr, restarts[[1L]])
  37: 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() {    })
  38: test_code(code = exprs, env = env, reporter = get_reporter() %||%     StopReporter$new())
  39: source_file(path, env = env(env), desc = desc, shuffle = shuffle,     error_call = error_call)
  40: FUN(X[[i]], ...)
  41: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle,     error_call = error_call)
  42: doTryCatch(return(expr), name, parentenv, handler)
  43: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  44: tryCatchList(expr, classes, parentenv, handlers)
  45: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  46: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, desc = desc, shuffle = shuffle, error_call = error_call))
  47: 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)
  48: 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)
  49: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  50: test_check("whomds")
  An irrecoverable exception occurred. R is aborting now ...
  Segmentation fault