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.62k stars 632 forks source link

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

Open MichaelChirico opened 6 months ago

MichaelChirico commented 6 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=).