From f6e8544d14da89f0a2a419aa33cf5dcde24b781d Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 3 Oct 2023 12:15:37 +0200 Subject: [PATCH] lintr --- R/model_performance.lm.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/model_performance.lm.R b/R/model_performance.lm.R index d8e7d76eb..f03ee726e 100644 --- a/R/model_performance.lm.R +++ b/R/model_performance.lm.R @@ -125,10 +125,10 @@ model_performance.lm <- function(model, metrics = "all", verbose = TRUE, ...) { if (("LOGLOSS" %in% toupper(metrics)) && isTRUE(info$is_binomial)) { out$Log_loss <- .safe({ .logloss <- performance_logloss(model, verbose = verbose) - if (!is.na(.logloss)) { - .logloss - } else { + if (is.na(.logloss)) { NULL + } else { + .logloss } }) }