Skip to content

Commit 097545a

Browse files
committed
default to zero if polyroot fails to return any roots
1 parent babc96e commit 097545a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/PLSDA_class.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ prob=function(x,yhat,ytrue)
148148

149149
if (length(t)>1) {
150150
# multiple cross over points so choose the one closest to 0
151-
t=t[which.min(abs(t),)]
151+
t=t[which.min(abs(t))]
152152
}
153153

154154
if (length(t)==0 ) {

0 commit comments

Comments
 (0)