Running ‘testthat.R’ [7s/28s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > Sys.setenv("R_TESTS" = "") # see https://github.com/hadley/testthat/issues/86
  > library(testthat)
  > library(checkmate)
  > library(dplyr)
  
  Attaching package: 'dplyr'
  
  The following object is masked from 'package:testthat':
  
      matches
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  > library(purrr)
  
  Attaching package: 'purrr'
  
  The following object is masked from 'package:testthat':
  
      is_null
  
  > library(tidyr)
  > # library(pammtools)
  > 
  > test_check("pammtools")
  Loading required package: pammtools
  
  Attaching package: 'pammtools'
  
  The following object is masked from 'package:stats':
  
      filter
  
  
   *** caught segfault ***
  address 74c08500, cause 'memory not mapped'
  
  Traceback:
   1: qassert(classes, "S+")
   2: checkClass(x, classes, ordered, null.ok)
   3: assert_class(formula, "formula")
   4: (function (formula, data, cut = NULL, max_time = NULL, ...) {    assert_class(formula, "formula")    assert_data_frame(data, min.rows = 1, min.cols = 2)    assert_numeric(cut, lower = 0, finite = TRUE, any.missing = FALSE,         min.len = 1, null.ok = TRUE)    assert_number(max_time, lower = 0, finite = TRUE, null.ok = TRUE)    surv_vars <- all.vars(update(formula, . ~ 0))    vars <- if ("." %in% all.vars(formula)) {        names(data)    }    else {        all.vars(formula)    }    uvars <- union(surv_vars, vars)    if (!all(uvars %in% vars)) {        stop(paste("Variables provided in formula not in data set:",             paste0(setdiff(uvars, vars), collapse = ", ")))    }    if (length(surv_vars) != 2) {        stop("Currently a formula of the form Surv(time, event)~., is required.\n\n      See ?Surv for more details.")    }    proposed.names <- c("ped_time", "ped_status")    if (any(proposed.names %in% names(data))) {        stop(paste0("Error in attempt to rename provided time/status variables:\n      Variables ",             intersect(proposed.names, names(data)), " allready in data set."))    }    data <- rename(data, !!!set_names(surv_vars, as.list(proposed.names)))    formula <- as.formula(paste0("Surv(ped_time, ped_status)",         paste0(formula[-2], collapse = "")))    cut <- get_cut(data, formula, cut = cut, max_time = max_time)    dots <- list(...)    dots$data <- data    dots$formula <- formula    dots$cut <- cut    rm(data)    if (!is.null(dots$id)) {        id_var <- dots$id    }    else {        id_var <- "id"        dots$id <- id_var    }    if (id_var %in% names(dots$data)) {        if (length(unique(dots$data[[id_var]])) != nrow(dots$data)) {            stop(paste0("Specified ID variable (", id_var, ") must have same number of\n        unique values as number of rows in 'data'."))        }        if (id_var %in% vars) {            dots$id <- NULL        }        else {            dots$id <- NULL            dots$formula <- update(dots$formula, paste0("~ . + ",                 id_var))        }    }    split_df <- do.call(survSplit, args = dots)    split_df <- split_df %>% mutate(ped_status = ifelse(.data$ped_status ==         1 & .data$ped_time > max(cut), 0L, .data$ped_status),         ped_time = pmin(.data$ped_time, max(cut)), offset = log(.data$ped_time -             .data$tstart)) %>% filter(!(.data$tstart == .data$ped_time))    split_df <- left_join(split_df, int_info(cut), by = c(tstart = "tstart"))    move <- c(id_var, "tstart", "tend", "interval", "intmid",         "intlen", "offset", "ped_time", "ped_status")    split_df <- split_df %>% select(one_of(move), everything(),         -one_of(c("intmid", "intlen", "ped_time")))    class(split_df) <- c("ped", class(split_df))    attr(split_df, "breaks") <- cut    attr(split_df, "id_var") <- id_var    attr(split_df, "intvars") <- c(id_var, "tstart", "tend",         "interval", "offset", "ped_status")    split_df})(id = "id", data = list(trt = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2), celltype = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L), time = c(72, 411, 228, 126, 118, 10, 82, 110, 314, 100, 42, 8, 144, 25, 11, 30, 384, 4, 54, 13, 123, 97, 153, 59, 117, 16, 151, 22, 56, 21, 18, 139, 20, 31, 52, 287, 18, 51, 122, 27, 54, 7, 63, 392, 10, 8, 92, 35, 117, 132, 12, 162, 3, 95, 177, 162, 216, 553, 278, 12, 260, 200, 156, 182, 143, 105, 103, 250, 100, 999, 112, 87, 231, 242, 991, 111, 1, 587, 389, 33, 25, 357, 467, 201, 1, 30, 44, 283, 15, 25, 103, 21, 13, 87, 2, 20, 7, 24, 99, 8, 99, 61, 25, 95, 80, 51, 29, 24, 18, 83, 31, 51, 90, 52, 73, 8, 36, 48, 7, 140, 186, 84, 19, 45, 80, 52, 164, 19, 53, 15, 43, 340, 133, 111, 231, 378, 49), status = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), karno = c(60, 70, 60, 60, 70, 20, 40, 80, 50, 70, 60, 40, 30, 80, 70, 60, 60, 40, 80, 60, 40, 60, 60, 30, 80, 30, 50, 60, 80, 40, 20, 80, 30, 75, 70, 60, 30, 60, 80, 60, 70, 50, 50, 40, 40, 20, 70, 40, 80, 80, 50, 80, 30, 80, 50, 80, 50, 70, 60, 40, 80, 80, 70, 90, 90, 80, 80, 70, 60, 90, 80, 80, 50, 50, 70, 70, 20, 60, 90, 30, 20, 70, 90, 80, 50, 70, 60, 90, 50, 30, 70, 20, 30, 60, 40, 30, 20, 60, 70, 80, 85, 70, 70, 70, 50, 30, 40, 40, 40, 99, 80, 60, 60, 60, 60, 50, 70, 10, 40, 70, 90, 80, 50, 40, 40, 60, 70, 30, 60, 30, 60, 80, 75, 60, 70, 80, 30), diagtime = c(7, 5, 3, 9, 11, 5, 10, 29, 18, 6, 4, 58, 4, 9, 11, 3, 9, 2, 4, 4, 3, 5, 14, 2, 3, 4, 12, 4, 12, 2, 15, 2, 5, 3, 2, 25, 4, 1, 28, 8, 1, 7, 11, 4, 23, 19, 10, 6, 2, 5, 4, 5, 3, 4, 16, 5, 15, 2, 12, 12, 5, 12, 2, 2, 8, 11, 5, 8, 13, 12, 6, 3, 8, 1, 7, 3, 21, 3, 2, 6, 36, 13, 2, 28, 7, 11, 13, 2, 13, 2, 22, 4, 2, 2, 36, 9, 11, 8, 3, 2, 4, 2, 2, 1, 17, 87, 8, 2, 5, 3, 3, 5, 22, 3, 3, 5, 8, 4, 4, 3, 3, 4, 10, 3, 4, 4, 15, 4, 12, 5, 11, 10, 1, 5, 18, 4, 3), age = c(69, 64, 38, 63, 65, 49, 69, 68, 43, 70, 81, 63, 63, 52, 48, 61, 42, 35, 63, 56, 55, 67, 63, 65, 46, 53, 69, 68, 43, 55, 42, 64, 65, 65, 55, 66, 60, 67, 53, 62, 67, 72, 48, 68, 67, 61, 60, 62, 38, 50, 63, 64, 43, 34, 66, 62, 52, 47, 63, 68, 45, 41, 66, 62, 60, 66, 38, 53, 37, 54, 60, 48, 52, 70, 50, 62, 65, 58, 62, 64, 63, 58, 64, 52, 35, 63, 70, 51, 40, 69, 36, 71, 62, 60, 44, 54, 66, 49, 72, 68, 62, 71, 70, 61, 71, 59, 67, 60, 69, 57, 39, 62, 50, 43, 70, 66, 61, 81, 58, 63, 60, 62, 42, 69, 63, 45, 68, 39, 66, 63, 49, 64, 65, 64, 67, 65, 37),     prior = c(0, 10, 0, 10, 10, 0, 10, 0, 0, 0, 0, 10, 0, 10,     10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 10, 0, 0, 10, 10, 0,     0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 0, 0, 0,     0, 10, 0, 0, 0, 10, 0, 0, 0, 0, 10, 0, 10, 0, 0, 0, 0, 0,     10, 10, 10, 0, 0, 10, 0, 10, 0, 10, 0, 0, 0, 0, 0, 0, 10,     0, 0, 10, 0, 10, 0, 10, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0,     0, 0, 0, 10, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,     0, 10, 0, 0, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0, 10, 0, 0)),     formula = Surv(time, status) ~ trt + age, cut = c(0, 50,     100, 200, 300, 400))
   5: do.call(split_data, dots)
   6: as_ped.data.frame(., Surv(time, status) ~ trt + age, cut = c(0,     50, 100, 200, 300, 400), id = "id")
   7: as_ped(., Surv(time, status) ~ trt + age, cut = c(0, 50, 100,     200, 300, 400), id = "id")
   8: function_list[[k]](value)
   9: withVisible(function_list[[k]](value))
  10: freduce(value, `_function_list`)
  11: `_fseq`(`_lhs`)
  12: eval(quote(`_fseq`(`_lhs`)), env, env)
  13: eval(quote(`_fseq`(`_lhs`)), env, env)
  14: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  15: veteran %>% as_ped(Surv(time, status) ~ trt + age, cut = c(0,     50, 100, 200, 300, 400), id = "id")
  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(NULL, exprs, env)
  27: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  28: force(code)
  29: 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()    })
  30: FUN(X[[i]], ...)
  31: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  32: force(code)
  33: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE, wrap = wrap))
  34: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  35: 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)
  36: 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)
  37: test_check("pammtools")
  An irrecoverable exception occurred. R is aborting now ...