Skip to content

Commit 9670445

Browse files
authored
add message for manually including the data in report() for htest objects (#472)
1 parent 084ed2e commit 9670445

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

R/report.htest.R

+10
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,16 @@ report_effectsize.htest <- function(x, ...) {
4444
model_info <- suppressWarnings(insight::model_info(x, verbose = FALSE))
4545
}
4646

47+
model_data <- insight::get_data(x)
48+
if (is.null(model_data) && is.null(dot_args$data)) {
49+
insight::format_alert(
50+
paste0(
51+
"In the report() function, for htest objects, you can try providing ",
52+
"the data argument manually, e.g., report(x, data = data)."
53+
)
54+
)
55+
}
56+
4757
# remove arg, so dots can be passed to effectsize
4858
dot_args[["model_info"]] <- NULL
4959

0 commit comments

Comments
 (0)