From a3a06df11858161c620ab72c25c69a58b434a7b6 Mon Sep 17 00:00:00 2001 From: Sebastian Funk Date: Fri, 2 Aug 2024 10:11:44 +0000 Subject: [PATCH] hotfix: bound delays before getting max --- R/create.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/create.R b/R/create.R index 80b8f1970..3890ae34f 100644 --- a/R/create.R +++ b/R/create.R @@ -742,7 +742,8 @@ create_stan_delays <- function(..., time_points = 1L) { ## discretise delays <- map(delays, discretise, strict = FALSE) ## get maximum delays - max_delay <- unname(as.numeric(flatten(map(delays, max)))) + bounded_delays <- map(delays, function(x) discretise(fix_dist(x))) + max_delay <- unname(as.numeric(flatten(map(bounded_delays, max)))) ## number of different non-empty types type_n <- vapply(delays, ndist, integer(1)) ## assign ID values to each type