xrobin / pROC

Display and analyze ROC curves in R and S+
https://cran.r-project.org/web/packages/pROC/
GNU General Public License v3.0
121 stars 31 forks source link

Update list of CRAN packages that export roc or auc functions. #31

Closed xrobin closed 6 years ago

xrobin commented 6 years ago

https://github.com/xrobin/pROC/wiki/FAQ---Frequently-asked-questions#the-functions-are-giving-me-weird-error-messages-i-dont-understand

xrobin commented 6 years ago

It seems that more than just a generic function is needed. For instance, precrec has an auc function but pROC methods get masked anyway:

library(pROC)
data(aSAH)
library(precrec)
auc(roc(aSAH$outcome, aSAH$s100b))
Error in auc.default(roc(aSAH$outcome, aSAH$s100b)) : 
  An object of unknown class is specified
3: stop("An object of unknown class is specified")
2: auc.default(roc(aSAH$outcome, aSAH$s100b))
1: auc(roc(aSAH$outcome, aSAH$s100b))

For some reason the methods are gone. Maybe exporting auc is resetting them?

methods("auc")
[1] auc.aucs*    auc.default*

If so listing generics vs non generics is irrelevant.

xrobin commented 6 years ago

Wiki updated, script for future updates available in inst/extra/sos_clashes.R.