sachsmc / plotROC

Interactive ROC plots with ggplot + d3.js.
http://sachsmc.github.io/plotROC
Other
86 stars 15 forks source link

calc_auc() returns empty object if geom_roc() is not the first layer #71

Closed JohannesNE closed 5 years ago

JohannesNE commented 5 years ago

If i add a geom_abline() before the plot_roc() layer, calc_auc() does not work.

> ggroc <- ggplot(rocdata, aes(m = M, d = D)) + 
+   geom_abline(intercept = 0, slope = 1) +
+   geom_roc()
> calc_auc(ggroc)
[1] PANEL group AUC  
<0 rows> (or 0-length row.names)
sachsmc commented 5 years ago

@JohannesNE which version of plotROC are you using?

JohannesNE commented 5 years ago

The CRAN version. Updated to the dev version (2.2.1) and now it works flawlessly. Sorry for not testing that.