xgboost icon indicating copy to clipboard operation
xgboost copied to clipboard

change in R 4.2 disallows a comparison used in xgboost()

Open apsteinmetz opened this issue 1 year ago • 3 comments

So I got this error when running R xgbboost::xgboost()

Error in is.na(output) || !is.character(output) : 'length = 3' in coercion to 'logical(1)'

While it says "error" it is actually a warning because xgboost()returns a valid result. It seems to be in how the '||' operator behavior was changed in R 4.2. See here for more info:

r-warning-lengthx-2-1-in-coercion-to-logical

apsteinmetz avatar Apr 27 '23 18:04 apsteinmetz

Thanks for raising the issue. Would you be interested in submitting a pull request to fix it?

hcho3 avatar Apr 27 '23 19:04 hcho3

I am having the same error when running xgboost() in R

reinpmomz avatar Oct 25 '23 23:10 reinpmomz

Can you provide a small reproducible example please?

mayer79 avatar Dec 09 '23 11:12 mayer79