Skip to content

Commit

Permalink
use isTRUE to handle NAs from family in format.epiparameter
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwlambert committed Oct 7, 2024
1 parent ce7dbb9 commit 002b2a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/epiparameter.R
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,8 @@ format.epiparameter <- function(x, ...) {
no = tr_("Distribution: %s")
)
fam <- family(x)
if (fam == "mixture") {
# isTRUE to control for family returning NA for unparameterised
if (isTRUE(fam == "mixture")) {
fam <- paste(fam, toString(.get_mixture_family(x)), sep = ": ")
}
writeLines(sprintf(dist_string, fam))
Expand Down

0 comments on commit 002b2a6

Please sign in to comment.