From 01ed65b2c296036bdba3e733749d156cab770bca Mon Sep 17 00:00:00 2001 From: Sebastian Funk Date: Mon, 5 Feb 2024 11:58:07 +0000 Subject: [PATCH] avoid using array-vector arithmetic in dist_skel --- R/dist.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/R/dist.R b/R/dist.R index 32f0fbe0e..be218d0da 100644 --- a/R/dist.R +++ b/R/dist.R @@ -1403,12 +1403,12 @@ fix_dist <- function(x, strategy = c("mean", "sample")) { ## apply stragey depending on choice if (strategy == "mean") { x <- dist_spec( - mean = x$mean_mean, - sd = x$sd_mean, + mean = c(x$mean_mean), + sd = c(x$sd_mean), mean_sd = 0, sd_sd = 0, distribution = x$dist, - max = x$max + max = c(x$max) ) } else if (strategy == "sample") { lower_bound <- ifelse(x$dist == "gamma", 0, -Inf) @@ -1422,7 +1422,7 @@ fix_dist <- function(x, strategy = c("mean", "sample")) { mean_sd = 0, sd_sd = 0, distribution = x$dist, - max = x$max + max = c(x$max) ) } return(x)