Skip to content

Instantly share code, notes, and snippets.

@grayskripko
Last active July 20, 2017 15:57
Show Gist options
  • Save grayskripko/4b94e8454337309556b58282d18b4232 to your computer and use it in GitHub Desktop.
Save grayskripko/4b94e8454337309556b58282d18b4232 to your computer and use it in GitHub Desktop.
caret: Error in method$fit ... formal argument <some_name> matched by multiple actual arguments
debug(caret::createModel)
pay attention to model$fit: https://github.com/topepo/caret/blob/master/pkg/caret/R/createModel.R#L46
If <some_name> == 'param' and you use do.call(caret::train, arg_list), pass parameters in 'param' without list, as is.
Anyway, the important part of the stacktrace is:
1. caret::train.default
2. caret::createModel # <- the location of the problem
3. model$fit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment