Skip to content

Commit

Permalink
Fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmbaazam authored and seabbs committed Aug 27, 2024
1 parent d1614d7 commit 1754244
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions R/checks.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,13 @@ check_stan_delay <- function(dist) {
# distributions with numeric parameters and infinite maximum
numeric_or_normal <- unlist(lapply(seq_len(ndist(dist)), function(id) {
if (get_distribution(dist, id) != "nonparametric") {
params <- get_parameters(dist, id)
vapply(params, function(x) {
is.numeric(x) ||
(is(x, "dist_spec") && get_distribution(x) == "normal" &&
is.infinite(max(x)))
}, logical(1))}
params <- get_parameters(dist, id)
vapply(params, function(x) {
is.numeric(x) ||
(is(x, "dist_spec") && get_distribution(x) == "normal" &&
is.infinite(max(x)))
}, logical(1))
}
}))
if (!all(numeric_or_normal)) {
stop(
Expand Down

0 comments on commit 1754244

Please sign in to comment.