Skip to content

Commit

Permalink
Documentation and error message fix
Browse files Browse the repository at this point in the history
 - Towards the end of PR #711 I changed which model was passed to `nm_data(filter = TRUE)`. While updating the NEWS I realized some parameter documentation and an error message were not consistent with this change.

 - Minor enough to include in this PR
  • Loading branch information
barrettk committed Sep 19, 2024
1 parent 2e8ff40 commit 37a039d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions R/bootstrap-model.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ new_bootstrap_run <- function(
#' @param seed A numeric seed to set prior to resampling the data; use `NULL` to
#' avoid setting a seed.
#' @param data A dataset to resample from. Defaults to `NULL`, which will use
#' the _filtered_ output from `nm_data(.mod, filter = TRUE)`. If provided,
#' the _filtered_ output from `nm_data(.boot_run, filter = TRUE)`. If provided,
#' must include the same column names as what's returned from `nm_data(.mod)`.
#' @param .bbi_args Named list passed to `model_summary(orig_mod, .bbi_args)`,
#' where `orig_mod` is the model `.boot_run` is based on. See
Expand Down Expand Up @@ -212,7 +212,7 @@ setup_bootstrap_run <- function(
cli::cli_abort(
c(
"!" = "The filtered dataset does not have the same number of records as the original model:",
"*" = "{.code nm_data(orig_mod, filter = TRUE)} returned {.val {nrec_f}} records",
"*" = "{.code nm_data(.boot_run, filter = TRUE)} returned {.val {nrec_f}} records",
"*" = "{.code model_summary(orig_mod)} returned {.val {nrec}} records",
"i" = "where {.code orig_mod <- read_model(get_based_on(.boot_run))}",
"i" = "Try providing a starting dataset (e.g., {.code setup_bootstrap_run(.boot_run, data = nm_join(orig_mod))})"
Expand Down
2 changes: 1 addition & 1 deletion man/setup_bootstrap_run.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 37a039d

Please sign in to comment.