Pārlūkot izejas kodu

Returning NULL when no vars are supplied in ggROC

Andrej 6 dienas atpakaļ
vecāks
revīzija
a3a6c60744
1 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  1. 3 0
      R/roc.R

+ 3 - 0
R/roc.R

@@ -253,6 +253,9 @@ simple.plotROCgg<-function(df,vars,cols,x=0.7,y=0.3,units=c(),precise="FALSE",ta
       print('ggplot2 not available. Use simple.plotROC function')
       return(NULL)
    }
+   if (length(vars)==0){ 
+      return(NULL)
+   }
 
    #ggplot alternative
    cvalues<-base::c()