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

> ### Name: ternary_data
> ### Title: Prepare data for showing contours in ternary diagrams.
> ### Aliases: ternary_data
> 
> ### ** Examples
> 
> library(DImodels)
> library(dplyr)

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union

> 
> ## Load data
> data(sim0)
> 
> ## Fit model
> mod <- lm(response ~ 0 + (p1 + p2 + p3)^2, data = sim0)
> 
> ## Prepare data for creating a contour map of predicted response over
> ## the ternary surface
> ## Remember to specify prop with the same character values as the names
> ## of the variables in the model containing the prop.
> plot_data <- ternary_data(resolution = 1, model = mod,
+                           prop = c("p1", "p2", "p3"))
> ## Show plot
> ternary_plot(data = plot_data)
✔ Created plot.

 *** caught segfault ***
address (nil), cause 'memory not mapped'

Traceback:
 1: structure(.Call(C_objectSize, x), class = "object_size")
 2: object.size(value)
 3: encl$`_cache`$set(key, res)
 4: .impute_data(data, na.fill)
 5: compute_group(...)
 6: self$compute_group(data = group, scales = scales, ...)
 7: FUN(X[[i]], ...)
 8: lapply(groups, function(group) {    self$compute_group(data = group, scales = scales, ...)})
 9: compute_panel(..., self = self)
10: (function (...) compute_panel(..., self = self))(data = data, scales = scales,     na.rm = FALSE, breaks = c(14.8, 17.2, 19.6, 22, 24.41, 26.81,     29.21, 31.61))
11: do.call(self$compute_panel, args)
12: doTryCatch(return(expr), name, parentenv, handler)
13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
14: tryCatchList(expr, classes, parentenv, handlers)
15: tryCatch(do.call(self$compute_panel, args), error = function(e) {    warningf("Computation failed in `%s()`:\n %s", ggplot2:::snake_class(self),         e$message, call. = FALSE)    data.frame()})
16: .fun(piece, ...)
17: (function (i) {    piece <- pieces[[i]]    if (.inform) {        res <- try(.fun(piece, ...))        if (inherits(res, "try-error")) {            piece <- paste(utils::capture.output(print(piece)),                 collapse = "\n")            stop("with piece ", i, ": \n", piece, call. = FALSE)        }    }    else {        res <- .fun(piece, ...)    }    progress$step()    res})(1L)
18: loop_apply(n, do.ply)
19: llply(.data = .data, .fun = .fun, ..., .progress = .progress,     .inform = .inform, .parallel = .parallel, .paropts = .paropts)
20: ldply(.data = pieces, .fun = .fun, ..., .progress = .progress,     .inform = .inform, .parallel = .parallel, .paropts = .paropts)
21: plyr::ddply(data, "PANEL", function(data) {    scales <- layout$get_scales(data$PANEL[1])    tryCatch(do.call(self$compute_panel, args), error = function(e) {        warningf("Computation failed in `%s()`:\n %s", ggplot2:::snake_class(self),             e$message, call. = FALSE)        data.frame()    })})
22: compute_layer(..., self = self)
23: self$stat$compute_layer(data, self$computed_stat_params, layout)
24: compute_statistic(..., self = self)
25: l$compute_statistic(d, layout)
26: f(l = layers[[i]], d = data[[i]])
27: withCallingHandlers(expr, condition = function(cnd) {    {        .__handler_frame__. <- TRUE        .__setup_frame__. <- frame        if (inherits(cnd, "message")) {            except <- c("warning", "error")        }        else if (inherits(cnd, "warning")) {            except <- "error"        }        else {            except <- ""        }    }    while (!is_null(cnd)) {        if (inherits(cnd, "error")) {            out <- handlers[[1L]](cnd)            if (!inherits(out, "rlang_zap"))                 throw(out)        }        inherit <- .subset2(.subset2(cnd, "rlang"), "inherit")        if (is_false(inherit)) {            return()        }        cnd <- .subset2(cnd, "parent")    }})
28: doTryCatch(return(expr), name, parentenv, handler)
29: tryCatchOne(expr, names, parentenv, handlers[[1L]])
30: tryCatchList(expr, classes, parentenv, handlers)
31: tryCatch(withCallingHandlers(expr, condition = function(cnd) {    {        .__handler_frame__. <- TRUE        .__setup_frame__. <- frame        if (inherits(cnd, "message")) {            except <- c("warning", "error")        }        else if (inherits(cnd, "warning")) {            except <- "error"        }        else {            except <- ""        }    }    while (!is_null(cnd)) {        if (inherits(cnd, "error")) {            out <- handlers[[1L]](cnd)            if (!inherits(out, "rlang_zap"))                 throw(out)        }        inherit <- .subset2(.subset2(cnd, "rlang"), "inherit")        if (is_false(inherit)) {            return()        }        cnd <- .subset2(cnd, "parent")    }}), stackOverflowError = handlers[[1L]])
32: try_fetch(for (i in seq_along(data)) {    out[[i]] <- f(l = layers[[i]], d = data[[i]])}, error = function(cnd) {    cli::cli_abort(c("Problem while {step}.", i = "Error occurred in the {ordinal(i)} layer."),         call = layers[[i]]$constructor, parent = cnd)})
33: by_layer(function(l, d) l$compute_statistic(d, layout), layers,     data, "computing stat")
34: ggplot_build.ggplot(x)
35: ggplot_build(x)
36: print.ggplot(x)
37: (function (x, ...) UseMethod("print"))(x)
An irrecoverable exception occurred. R is aborting now ...