Running ‘testthat.R’ [2s/2s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(checkmate)
  > library(coalitions)
  > 
  > test_check("coalitions")
  
   *** caught segfault ***
  address 0x6a63, cause 'memory not mapped'
  
  Traceback:
   1: .data$respondents
   2: eval_tidy(enquo(var), var_env)
   3: tidyselect::vars_pull(names(.data), !!enquo(var))
   4: pull.data.frame(., .data$respondents)
   5: pull(., .data$respondents)
   6: function_list[[i]](value)
   7: freduce(value, `_function_list`)
   8: `_fseq`(`_lhs`)
   9: eval(quote(`_fseq`(`_lhs`)), env, env)
  10: eval(quote(`_fseq`(`_lhs`)), env, env)
  11: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  12: eligible_df %>% ungroup() %>% group_by(.data$pollster, date) %>%     slice(1) %>% ungroup() %>% pull(.data$respondents) %>% sum()
  13: get_n(elg_udf)
  14: pool_surveys(., last_date = max(tidyr::unnest(.survey_sample)$date))
  15: function_list[[k]](value)
  16: withVisible(function_list[[k]](value))
  17: freduce(value, `_function_list`)
  18: `_fseq`(`_lhs`)
  19: eval(quote(`_fseq`(`_lhs`)), env, env)
  20: eval(quote(`_fseq`(`_lhs`)), env, env)
  21: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  22: .survey_sample %>% pool_surveys(last_date = max(tidyr::unnest(.survey_sample)$date))
  23: eval(code, test_env)
  24: eval(code, test_env)
  25: withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error)
  26: doTryCatch(return(expr), name, parentenv, handler)
  27: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  28: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  29: doTryCatch(return(expr), name, parentenv, handler)
  30: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  31: tryCatchList(expr, classes, parentenv, handlers)
  32: tryCatch(withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error), error = handle_fatal,     skip = function(e) {    })
  33: test_code(desc, code, env = parent.frame())
  34: test_that("Pooling works as expected", {    pooled <- .survey_sample %>% pool_surveys(last_date = max(tidyr::unnest(.survey_sample)$date))    expect_data_frame(pooled, nrow = 7, ncol = 8)    expect_equal(sum(pooled$percent), 100)    expect_equal(round(sum(pooled$votes)), 3055)    pool <- pooled %>% tidyr::nest(party:votes, .key = "survey")    pool <- pool %>% get_probabilities(., nsim = 10) %>% unnest()    expect_data_frame(pool, nrow = 6, ncol = 4)    expect_subset(colnames(pool), c("pollster", "date", "coalition",         "probability"))    s1 <- .survey_sample %>% unnest() %>% slice(1) %>% unnest()    s1$percent <- c(34, 34, 8.5, 8, 4.5, 8, 3)    s1$votes <- s1$percent * 1421/100    s2 <- s1    s2$pollster <- "emnid"    s2$date <- as.Date("2016-08-22")    s12 <- bind_rows(s1, s2) %>% nest(party:votes, .key = "survey") %>%         nest(-pollster, .key = "surveys")    pool <- pool_surveys(s12, last_date = as.Date("2017-08-22"))    expect_data_frame(pool, nrow = 7, ncol = 8)})
  35: eval(code, test_env)
  36: eval(code, test_env)
  37: withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error)
  38: doTryCatch(return(expr), name, parentenv, handler)
  39: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  40: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  41: doTryCatch(return(expr), name, parentenv, handler)
  42: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  43: tryCatchList(expr, classes, parentenv, handlers)
  44: tryCatch(withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error), error = handle_fatal,     skip = function(e) {    })
  45: test_code(NULL, exprs, env)
  46: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  47: force(code)
  48: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,     {        lister$start_file(basename(path))        source_file(path, new.env(parent = env), chdir = TRUE,             wrap = wrap)        end_context()    })
  49: FUN(X[[i]], ...)
  50: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  51: force(code)
  52: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE, wrap = wrap))
  53: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  54: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     wrap = wrap)
  55: test_package_dir(package = package, test_path = test_path, filter = filter,     reporter = reporter, ..., stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  56: test_check("coalitions")
  An irrecoverable exception occurred. R is aborting now ...
  Segmentation fault