From 8d9d366b7b7c74435be813882a393a63ddd66028 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 25 Apr 2024 13:24:20 +0200 Subject: [PATCH] use format_alerts --- R/get_marginalmeans.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/get_marginalmeans.R b/R/get_marginalmeans.R index 905f6fe5..fcf7530a 100644 --- a/R/get_marginalmeans.R +++ b/R/get_marginalmeans.R @@ -74,9 +74,9 @@ # Find categorical predictors at <- predictors[!vapply(data[predictors], is.numeric, logical(1))] if (!length(at) || all(is.na(at))) { - stop("Model contains no categorical factor. Please specify 'at'.", call. = FALSE) + insight::format_error("Model contains no categorical factor. Please specify 'at'.") } - message("We selected `at = c(", toString(paste0('"', at, '"')), ")`.") + insight::format_alert("We selected `at = c(", toString(paste0('"', at, '"')), ")`.") } list(at = at)