Skip to content

Commit

Permalink
Fixed a bug induced by issue #537
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Kuhn authored and Max Kuhn committed Jan 9, 2017
1 parent 854d128 commit 1d6f442
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/caret/R/train.default.R
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ train.default <- function(x, y,
} else {
tuneGrid <- models$grid(x = x, y = y, len = tuneLength, search = trControl$search)
if (tuneLength < nrow(tuneGrid))
tuneGrid <- tuneGrid[1:tuneLength, ]
tuneGrid <- tuneGrid[1:tuneLength,,drop = FALSE]
}
}

Expand Down

0 comments on commit 1d6f442

Please sign in to comment.