topepo / caret

caret (Classification And Regression Training) R package that contains misc functions for training and plotting classification and regression models
http://topepo.github.io/caret/index.html
1.61k stars 634 forks source link

Use full argument name for situations with restricted partial matching #1361

Open MichaelChirico opened 5 months ago

MichaelChirico commented 5 months ago
options(warnPartialMatchArgs=TRUE, warn=2L)
train(mpg ~ cyl, data=mtcars)
# Error in stats::model.frame(form = mpg ~ cyl, data = mtcars, na.action = na.fail) : 
#   (converted from warning) partial argument match of 'form' to 'formula'

Similar for seq(along=) and seq(length=).