Skip to content

Commit

Permalink
default to zero if polyroot fails to return any roots
Browse files Browse the repository at this point in the history
  • Loading branch information
grlloyd committed Dec 11, 2019
1 parent babc96e commit 097545a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/PLSDA_class.R
Expand Up @@ -148,7 +148,7 @@ prob=function(x,yhat,ytrue)

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

if (length(t)==0 ) {
Expand Down

0 comments on commit 097545a

Please sign in to comment.