Skip to content

Commit

Permalink
Fixed bug related to preprocessing discussion at the end of issue #575
Browse files Browse the repository at this point in the history
  • Loading branch information
topepo committed Jan 23, 2017
1 parent c393552 commit 7c3ae59
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/caret/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: caret
Version: 6.0-73
Date: 2016-11-08
Version: 6.0-75
Date: 2017-01-23
Title: Classification and Regression Training
Author: Max Kuhn. Contributions from Jed Wing, Steve Weston, Andre
Williams, Chris Keefer, Allan Engelhardt, Tony Cooper, Zachary Mayer,
Expand Down
2 changes: 1 addition & 1 deletion pkg/caret/R/train.default.R
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ train.default <- function(x, y,
warning("Models using Weka will not work with parallel processing with multicore/doMC")
flush.console()

if(!is.null(preProcess) && !(all(preProcess %in% ppMethods)))
if(!is.null(preProcess) && !(all(names(preProcess) %in% ppMethods)))
stop(paste('pre-processing methods are limited to:', paste(ppMethods, collapse = ", ")))
if(modelType == "Classification") {
## We should get and save the class labels to ensure that predictions are coerced
Expand Down

0 comments on commit 7c3ae59

Please sign in to comment.