Skip to content

Commit

Permalink
avoid using array-vector arithmetic in dist_skel
Browse files Browse the repository at this point in the history
  • Loading branch information
sbfnk committed Feb 5, 2024
1 parent 2ce8475 commit 01ed65b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/dist.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 01ed65b

Please sign in to comment.