From e9cb977c3cc103abdf469d054bf137cf2555e0cb Mon Sep 17 00:00:00 2001 From: James Azam Date: Wed, 20 Nov 2024 21:26:31 +0000 Subject: [PATCH] Fix check for `NA` in `multi.distspec` (#859) --- NEWS.md | 1 + R/opts.R | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index a93ec1b4d..1bfb11b66 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,7 @@ ## Model changes - A bug was fixed where the initial growth was never estimated (i.e. the prior mean was always zero). By @sbfnk in #853 and reviewed by @seabbs. +- A bug was fixed where an internal function for applying a default cdf cutoff failed due to a difference a vector length issue. By @jamesmbaazam in #858 and reviewed by @sbfnk. # EpiNow2 1.6.1 diff --git a/R/opts.R b/R/opts.R index c2c23429d..6b5a46b12 100644 --- a/R/opts.R +++ b/R/opts.R @@ -1091,7 +1091,7 @@ filter_opts <- function(opts, region) { #' constrained #' @keywords internal apply_default_cdf_cutoff <- function(dist, default_cdf_cutoff, cdf_cutoff_set) { - if (!is_constrained(dist) && !is.na(sd(dist))) { + if (!is_constrained(dist) && !anyNA(sd(dist))) { #nolint start: duplicate_argument_linter cli_inform( c(