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

unused argument (drop = FALSE) in xgbTree.R regression test #1288

Open johnhonan opened 2 years ago

johnhonan commented 2 years ago

https://github.com/topepo/caret/blob/679eabaac7e54f4e87efa6c3bff75659cb457d8b/RegressionTests/Code/xgbTree.R#L56

Running the xgbTree.R regression test gives me this error;

Error in `[.xgb.DMatrix`(x, 0, , drop = FALSE) : 
  unused argument (drop = FALSE)

This could be related to the following line in adaptive.R which assumes x is a matrix (and takes drop=FALSE) - But if you pass a xgb.DMatrix to this you'll get the error above.

https://github.com/topepo/caret/blob/0579b5dded32f5af9c4c6f4ef5a3898d3839c4d0/pkg/caret/R/adaptive.R#L58

Versions: R version 4.1.0 (2021-05-18) on x86_64-apple-darwin17.0 (64-bit) caret 6.0-92 xgboost 1.6.0.1

rogerwaldvogel commented 2 years ago

I have the same problem. Solved it by downgrading caret...

snvv commented 2 years ago

I have the same problem Downgrading did't help

aamaguay commented 1 year ago

Which versions did you use? @snvv