Skip to content

Commit 4d1558b

Browse files
authored
Merge pull request #1 from tony-stone/check-interval-widths-checks
Update mcmc-intervals.R
2 parents 621d52a + 8a8fdd3 commit 4d1558b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

R/mcmc-intervals.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -864,6 +864,8 @@ compute_interval_density <- function(x, interval_width = 1, n_dens = 1024,
864864
}
865865

866866
check_interval_widths <- function(prob, prob_outer) {
867+
if (!(is.numeric(prob) && is.numeric(prob_outer)))
868+
abort("`prob` and `prob_outer` must be numeric")
867869
if (prob < 0 || prob > 1 || prob_outer < 0 || prob_outer > 1)
868870
abort("`prob` and `prob_outer` must be in [0,1].")
869871
if (prob_outer < prob) {

0 commit comments

Comments
 (0)