Skip to content

Commit

Permalink
Allow NULL domain with grouped packer
Browse files Browse the repository at this point in the history
  • Loading branch information
richfitz committed Oct 29, 2024
1 parent 070b112 commit f5ccabd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: monty
Title: Monte Carlo Models
Version: 0.2.23
Version: 0.2.24
Authors@R: c(person("Rich", "FitzJohn", role = c("aut", "cre"),
email = "[email protected]"),
person("Wes", "Hinsley", role = "aut"),
Expand Down
4 changes: 3 additions & 1 deletion R/domain.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@
##' monty_domain_expand(rbind(x = c(0, 1), "x[2]" = c(0, Inf)), packer)
##' monty_domain_expand(rbind(x = c(0, 1), "y" = c(0, Inf)), packer)
monty_domain_expand <- function(domain, packer) {
assert_is(packer, "monty_packer")
assert_is(packer, c("monty_packer", "monty_packer_grouped"))
if (is.null(domain)) {
return(domain)
}

assert_is(packer, "monty_packer")

if (!is.matrix(domain)) {
cli::cli_abort("Expected 'domain' to be a matrix",
arg = "domain")
Expand Down

0 comments on commit f5ccabd

Please sign in to comment.