Skip to content

Commit

Permalink
lintr
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Oct 25, 2023
1 parent bdc6ecb commit 1df774f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions R/check_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ check_model.default <- function(x,
}

# try to find sensible default for "type" argument
suggest_dots <- (minfo$is_bernoulli || minfo$is_count || minfo$is_ordinal || minfo$is_categorical || minfo$is_multinomial)
suggest_dots <- (minfo$is_bernoulli || minfo$is_count || minfo$is_ordinal || minfo$is_categorical || minfo$is_multinomial) # nolint
if (missing(type) && suggest_dots) {
type <- "discrete_interval"
}
Expand Down Expand Up @@ -341,10 +341,10 @@ check_model.model_fit <- function(x,
dat$NCV <- .diag_ncv(model, verbose = verbose)
dat$HOMOGENEITY <- .diag_homogeneity(model, verbose = verbose)
dat$OUTLIERS <- check_outliers(model, method = "cook")
if (!is.null(dat$OUTLIERS)) {
threshold <- attributes(dat$OUTLIERS)$threshold$cook
} else {
if (is.null(dat$OUTLIERS)) {
threshold <- NULL
} else {
threshold <- attributes(dat$OUTLIERS)$threshold$cook
}
dat$INFLUENTIAL <- .influential_obs(model, threshold = threshold)
dat$PP_CHECK <- .safe(check_predictions(model, ...))
Expand All @@ -366,10 +366,10 @@ check_model.model_fit <- function(x,
dat$HOMOGENEITY <- .diag_homogeneity(model, verbose = verbose)
dat$REQQ <- .diag_reqq(model, level = 0.95, model_info = model_info, verbose = verbose)
dat$OUTLIERS <- check_outliers(model, method = "cook")
if (!is.null(dat$OUTLIERS)) {
threshold <- attributes(dat$OUTLIERS)$threshold$cook
} else {
if (is.null(dat$OUTLIERS)) {
threshold <- NULL
} else {
threshold <- attributes(dat$OUTLIERS)$threshold$cook
}
dat$INFLUENTIAL <- .influential_obs(model, threshold = threshold)
dat$PP_CHECK <- .safe(check_predictions(model, ...))
Expand Down

0 comments on commit 1df774f

Please sign in to comment.