Skip to content

Commit

Permalink
Improve check for max in dist_spec
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmbaazam committed Dec 12, 2024
1 parent 88584d6 commit 4df29b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/dist_spec.R
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ plot.dist_spec <- function(x, samples = 50L, res = 1, cumulative = TRUE, ...) {
cdf_cutoff <- 0
}
pmf_dt <- lapply(dists, function(y) {
if (is.infinite(attr(y, "max"))) {
if (is.infinite(max(y))) {
cli_abort(
c(
"!" = "All distributions in {.var x} must have a finite
Expand Down

0 comments on commit 4df29b6

Please sign in to comment.