Skip to content

Commit

Permalink
warning to msg
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Jul 1, 2023
1 parent 8c3b60e commit b717b90
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/hdi.R
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ hdi.get_predicted <- function(x, ...) {

if (window_size < 2) {
if (verbose) {
insight::format_warning("`ci` is too small or x does not contain enough data points, returning NAs.")
insight::format_message("`ci` is too small or x does not contain enough data points, returning NAs.")
}
return(data.frame(
"CI" = ci,
Expand All @@ -395,7 +395,7 @@ hdi.get_predicted <- function(x, ...) {

if (nCIs < 1) {
if (verbose) {
insight::format_warning("`ci` is too large or x does not contain enough data points, returning NAs.")
insight::format_message("`ci` is too large or x does not contain enough data points, returning NAs.")
}
return(data.frame(
"CI" = ci,
Expand All @@ -413,7 +413,7 @@ hdi.get_predicted <- function(x, ...) {
if (n_candies > 1) {
if (any(diff(sort(min_i)) != 1)) {
if (verbose) {
insight::format_warning("Identical densities found along different segments of the distribution, choosing rightmost.")
insight::format_message("Identical densities found along different segments of the distribution, choosing rightmost.")
}
min_i <- max(min_i)
} else {
Expand Down

0 comments on commit b717b90

Please sign in to comment.