Skip to content

Commit

Permalink
add message for manually including the data in report() for htest obj…
Browse files Browse the repository at this point in the history
…ects
  • Loading branch information
rempsyc committed Dec 10, 2024
1 parent 084ed2e commit d8c309a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions R/report.htest.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ report_effectsize.htest <- function(x, ...) {
model_info <- suppressWarnings(insight::model_info(x, verbose = FALSE))
}

model_data <- insight::get_data(x)
if (is.null(model_data) && is.null(dot_args$data)) {
insight::format_alert(
paste0(
"In the report() function, for htest objects, you can try providing ",
"the data argument manually, e.g., report(x, data = data)."
)
)
}

# remove arg, so dots can be passed to effectsize
dot_args[["model_info"]] <- NULL

Expand Down

0 comments on commit d8c309a

Please sign in to comment.