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 4d665f9 commit 55a644f
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)

Check warning on line 1425 in R/dist.R

View check run for this annotation

Codecov / codecov/patch

R/dist.R#L1425

Added line #L1425 was not covered by tests
)
}
return(x)
Expand Down

0 comments on commit 55a644f

Please sign in to comment.