Issue #127 resolved
In sPLSDA model, if I set up
near.zero.var =T in
splsda(), when I plot ROC curve, it will trigger error in the internal prediction function, because newdata only include data without zero value, but object$X include all data value.
# deal with near.zero.var in object, to remove the same variable in newdata as in object$X (already removed in object$X) if(length(object$nzv$Position) > 0) newdata = newdata[, -object$nzv$Position,drop=FALSE] if(all.equal(colnames(newdata),colnames(object$X))!=TRUE) stop("'newdata' must include all the variables of 'object$X'")