Running ‘testthat.R’ [21s/37s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # rm(list = ls())
  > # Sys.setenv("R_TESTS" = "")
  > library(testthat)
  > # library(collapse)
  > 
  > test_check("collapse")
  Loading required package: collapse
  collapse 1.7.0, see ?`collapse-package` or ?`collapse-documentation`
  
  Attaching package: 'collapse'
  
  The following object is masked from 'package:stats':
  
      D
  
  
   *** caught segfault ***
  address 0x30, cause 'memory not mapped'
  
  Traceback:
   1: FUN(X[[i]], ...)
   2: lapply(gsplit(x, g), FUN, ...)
   3: unlist(lapply(gsplit(x, g), FUN, ...), FALSE, FALSE)
   4: copyMostAttributes(unlist(lapply(gsplit(x, g), FUN, ...), FALSE,     FALSE), x)
   5: FUN(X[[i]], ...)
   6: lapply(data, copysplaplfun, by, FUN, ...)
   7: applyfuns_internal(xnnu, by, catFUN, namcatFUN %in% .FAST_STAT_FUN_EXT,     parallel, mc.cores, ...)
   8: condsetn(applyfuns_internal(xnnu, by, catFUN, namcatFUN %in%     .FAST_STAT_FUN_EXT, parallel, mc.cores, ...), namcatFUN,     give.names)
   9: agg(if (nul) X[nu] else NULL, if (nnul) X[nnu] else NULL, ...)
  10: collap(wlddev, ~country + decade, bsum, Mode, na.rm = TRUE, keep.col.order = FALSE)
  11: setNames(unattrib(x), names(x))
  12: oa(collap(wlddev, ~country + decade, bsum, Mode, na.rm = TRUE,     keep.col.order = FALSE))
  13: eval_bare(expr, quo_get_env(quo))
  14: quasi_label(enquo(object), label, arg = "object")
  15: expect_equal(oa(collap(wlddev, ~country + decade, bsum, Mode,     na.rm = TRUE, keep.col.order = FALSE)), oa(cbind(g$groups,     BY(get_vars(wlddev, c(4, 9:13)), g, bsum, na.rm = TRUE, use.g.names = FALSE),     BY(get_vars(wlddev, c(2:3, 6:8)), g, Mode, na.rm = TRUE,         use.g.names = FALSE))))
  16: eval(code, test_env)
  17: eval(code, test_env)
  18: 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)
  19: doTryCatch(return(expr), name, parentenv, handler)
  20: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  21: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  22: doTryCatch(return(expr), name, parentenv, handler)
  23: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  24: tryCatchList(expr, classes, parentenv, handlers)
  25: 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) {    })
  26: test_code(desc, code, env = parent.frame(), reporter = reporter)
  27: test_that("collap performs as intended in simple uses with base/stats functions",     {        expect_equal(oa(collap(mtcars, mtcars$cyl, bsum, keep.by = FALSE)),             oa(fsum(mtcars, mtcars$cyl, use.g.names = FALSE)))        expect_equal(oa(collap(mtcars, ~cyl, mean.default)),             oa(fmean(mtcars, mtcars$cyl, use.g.names = FALSE)))        expect_equal(oa(collap(mtcars, ~cyl, bmean)), oa(fmean(mtcars,             mtcars$cyl, use.g.names = FALSE)))        expect_equal(oa(collap(mtcars, mtcars[2], bsum, keep.by = FALSE)),             oa(fsum(mtcars, mtcars$cyl, use.g.names = FALSE)))        expect_equal(oa(collap(mtcars, ~cyl, bsum, keep.by = FALSE)),             oa(fsum(mtcars[-2], mtcars$cyl, use.g.names = FALSE)))        expect_equal(unattrib(collap(iris, ~Species, bsum, keep.by = FALSE)),             unattrib(fsum(iris[-5], iris$Species, use.g.names = FALSE)))        expect_equal(oa(collap(airquality, ~Month, bsum, na.rm = TRUE,             keep.by = FALSE)), oa(fsum(airquality[-5], airquality$Month,             use.g.names = FALSE)))        expect_equal(oa(collap(wlddev, ~country + decade, bsum,             Mode, na.rm = TRUE, keep.col.order = FALSE)), oa(cbind(g$groups,             BY(get_vars(wlddev, c(4, 9:13)), g, bsum, na.rm = TRUE,                 use.g.names = FALSE), BY(get_vars(wlddev, c(2:3,                 6:8)), g, Mode, na.rm = TRUE, use.g.names = FALSE))))        expect_equal(oa(collap(wlddev, ~country + decade, bsum,             Mode, na.rm = TRUE)), oa(cbind(g$groups, BY(get_vars(wlddev,             c(4, 9:13)), g, bsum, na.rm = TRUE, use.g.names = FALSE),             BY(get_vars(wlddev, c(2:3, 6:8)), g, Mode, na.rm = TRUE,                 use.g.names = FALSE)))[order(c(1, 5, 4, 9:13,             2:3, 6:8))])    })
  28: eval(code, test_env)
  29: eval(code, test_env)
  30: 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)
  31: doTryCatch(return(expr), name, parentenv, handler)
  32: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  33: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  34: doTryCatch(return(expr), name, parentenv, handler)
  35: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  36: tryCatchList(expr, classes, parentenv, handlers)
  37: 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) {    })
  38: test_code(NULL, exprs, env)
  39: source_file(path, child_env(env), wrap = wrap)
  40: FUN(X[[i]], ...)
  41: lapply(test_paths, test_one_file, env = env, wrap = wrap)
  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, wrap = wrap))
  47: test_files(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,     wrap = wrap, load_package = load_package)
  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,     wrap = wrap, load_package = load_package, parallel = parallel)
  49: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  50: test_check("collapse")
  An irrecoverable exception occurred. R is aborting now ...
  Segmentation fault