Running examples in ‘pammtools-Ex.R’ failed
The error most likely occurred in:

> ### Name: add_hazard
> ### Title: Add predicted (cumulative) hazard to data set
> ### Aliases: add_hazard add_cumu_hazard
> 
> ### ** Examples
> 
> ped <- tumor[1:50,] %>% as_ped(Surv(days, status)~ age)

 *** caught segfault ***
address 9a300803, 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})(data = list(days = c(579, 1192, 308, 33, 397, 1219, 1238, 1074, 1483, 1430, 1542, 433, 1217, 257, 27, 214, 1624, 257, 1406, 435, 90, 1266, 1225, 680, 139, 3506, 1184, 209, 2252, 2652, 1467, 609, 625, 95, 530, 62, 1184, 613, 40, 1853, 1596, 610, 1296, 1247, 304, 831, 55, 498, 1550, 1465), status = c(0L, 0L, 1L, 1L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 1L, 1L, 1L, 1L, 0L, 1L, 0L, 1L, 0L, 0L, 0L, 0L, 1L, 0L, 1L, 1L, 0L, 0L, 1L, 0L, 0L, 0L, 1L, 1L, 0L, 1L, 0L, 1L, 1L, 0L, 0L, 1L, 1L, 1L, 1L, 0L, 0L, 0L),     charlson_score = c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L,     2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L,     2L, 4L, 2L, 2L, 2L, 4L, 3L, 3L, 2L, 2L, 2L, 2L, 3L, 2L, 2L,     3L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), age = c(58L, 52L,     74L, 57L, 30L, 66L, 67L, 82L, 21L, 45L, 29L, 39L, 71L, 58L,     71L, 55L, 52L, 86L, 29L, 68L, 62L, 72L, 73L, 59L, 57L, 53L,     78L, 46L, 64L, 53L, 62L, 70L, 34L, 65L, 69L, 74L, 59L, 83L,     47L, 65L, 72L, 53L, 77L, 54L, 63L, 46L, 85L, 55L, 64L, 62L    ), sex = c(2L, 1L, 2L, 1L, 2L, 2L, 1L, 2L, 1L, 1L, 1L, 1L,     2L, 2L, 2L, 1L, 2L, 1L, 2L, 2L, 2L, 1L, 2L, 2L, 1L, 1L, 1L,     1L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 1L, 1L, 1L, 2L, 2L, 2L, 2L,     2L, 1L, 2L, 1L, 2L, 2L, 2L, 2L), transfusion = c(2L, 1L,     2L, 2L, 2L, 2L, 2L, 1L, 1L, 2L, 1L, 2L, 2L, 1L, 2L, 2L, 2L,     1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 2L,     1L, 1L, 2L, 2L, 1L, 1L, 2L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 2L,     2L, 1L, 2L), complications = c(1L, 2L, 1L, 2L, 1L, 1L, 1L,     1L, 1L, 2L, 2L, 1L, 1L, 1L, 2L, 2L, 1L, 2L, 1L, 1L, 2L, 2L,     2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L,     2L, 2L, 1L, 2L, 2L, 1L, 1L, 1L, 2L, 2L, 1L, 2L, 1L), metastases = c(2L,     2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,     2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, 1L,     1L, 2L, 2L, 2L, 1L, 2L, 2L, 1L, 2L, 1L, 2L, 2L, 2L, 2L, 2L,     1L, 1L, 1L, 2L), resection = c(1L, 1L, 1L, 2L, 2L, 2L, 1L,     1L, 1L, 1L, 1L, 2L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 1L,     1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 1L, 2L, 1L, 1L, 2L, 2L,     1L, 2L, 1L, 2L, 1L, 1L, 2L, 1L, 1L, 2L, 2L, 2L, 1L)), formula = Surv(days,     status) ~ age)
 5: do.call(split_data, dots)
 6: as_ped.data.frame(., Surv(days, status) ~ age)
 7: as_ped(., Surv(days, status) ~ age)
 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: tumor[1:50, ] %>% as_ped(Surv(days, status) ~ age)
An irrecoverable exception occurred. R is aborting now ...