FDboost icon indicating copy to clipboard operation
FDboost copied to clipboard

Suboptimal usage of all.equal in if-statement in applyFolds()

Open Eva2703 opened this issue 1 year ago • 0 comments

On some PCs, line 508 in applyFolds() https://github.com/boost-R/FDboost/blob/6c172c57d3a8f3dda6503a78b9a9a2f92334ee88/R/crossvalidation.R#L508 produced the error

Error in if (all.equal(papply, mclapply) == TRUE) { : the condition has length > 1

for me. It can be easily fixed by changing the line to if (isTRUE(all.equal(papply, mclapply))) { (It also says in ?all.equal not to use all.equal directly in if expressions, but use isTRUE(all.equal(....)) instead.)

Eva2703 avatar Jul 04 '24 11:07 Eva2703