Closed Malhadas closed 5 years ago
R/caretList.R:236:71: style: Trailing whitespace is superfluous.
if(!is.null(model)) model$pred$pred <- as.numeric(model$pred$pred)
^~~~~~~~~~~~~~~
R/caretList.R:246:1: style: Trailing whitespace is superfluous.
^~~~~~
R/caretList.R:247:1: style: Trailing whitespace is superfluous.
^~~~~~
I have this problem. https://github.com/zachmayer/caretEnsemble/issues/210
I have this problem. #210
The solution I proposed worked for me and has not given me any problem yet
Caret not always returns numeric or factor predictions, instead sometimes it returns them as character wich results in errors in the caretEnsemble and caretStack functions. The underlying packages that implement the models themselves are in constant change and cannot be 100% trusted to always give the numeric values caretEnsemble and caretStack expect. In order to solve this issue, the line if(!is.null(model)) model$pred$pred <- as.numeric(model$pred$pred) can be added on the caretList function.