Skip to content

Commit

Permalink
tweak warning msg
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Aug 25, 2022
1 parent b88f724 commit 2f04137
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions R/check_outliers.R
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,10 @@ check_outliers.BFBayesFactor <- function(x,
}

if (!missing(ID)) {
warning("ID argument not supported with objects of class 'model'")
warning(
paste0("ID argument not supported for objects of class `", class(x)[1], "`."),
call. = FALSE
)
}

d <- insight::get_predictors(x)
Expand All @@ -1150,7 +1153,10 @@ check_outliers.gls <- function(x,
...) {

if (!missing(ID)) {
warning("ID argument not supported with objects of class 'model'")
warning(
paste0("ID argument not supported for objects of class `", class(x)[1], "`."),
call. = FALSE
)
}

valid_methods <- c("zscore_robust", "iqr", "ci", "pareto", "optics")
Expand Down Expand Up @@ -1412,7 +1418,7 @@ check_outliers.geeglm <- check_outliers.gls
...) {

if (any(is.na(x)) || any(with(x, x == Inf))) {
stop("missing or infinite values are not allowed.")
stop("Missing or infinite values are not allowed.", call. = FALSE)
}

out <- data.frame(Row = seq_len(nrow(x)))
Expand Down

0 comments on commit 2f04137

Please sign in to comment.