From 9670445650f363ebd237fc7c0f7a41397a20a2e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Th=C3=A9riault?= <13123390+rempsyc@users.noreply.github.com> Date: Tue, 10 Dec 2024 00:57:24 -0500 Subject: [PATCH] add message for manually including the data in report() for htest objects (#472) --- R/report.htest.R | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/R/report.htest.R b/R/report.htest.R index 430c4f84..e0140efa 100644 --- a/R/report.htest.R +++ b/R/report.htest.R @@ -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