Skip to content

Commit

Permalink
Update R/caretPredict.R
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
zachmayer and coderabbitai[bot] authored Dec 17, 2024
1 parent 3e174c9 commit 8e076af
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions R/caretPredict.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#' @keywords internal
caretPredict <- function(object, newdata = NULL, excluded_class_id = 1L, aggregate_resamples = TRUE, ...) {
stopifnot(methods::is(object, "train"))

Check warning on line 15 in R/caretPredict.R

View check run for this annotation

codefactor.io / CodeFactor

R/caretPredict.R#L15

Unify consecutive calls to stopifnot(). (consecutive_assertion_linter)

Check warning on line 15 in R/caretPredict.R

View workflow job for this annotation

GitHub Actions / lint

file=R/caretPredict.R,line=15,col=3,[consecutive_assertion_linter] Unify consecutive calls to stopifnot().
stopifnot(is.logical(aggregate_resamples), length(aggregate_resamples) == 1L)

# Extract the model type
is_class <- isClassifierAndValidate(object, validate_for_stacking = is.null(newdata))
Expand Down

0 comments on commit 8e076af

Please sign in to comment.