From 37355e2d9254d7e134a477aee9c13485b244f63e Mon Sep 17 00:00:00 2001 From: Xavier Robin Date: Fri, 27 Apr 2018 21:34:58 +0200 Subject: [PATCH] This hack should not be necessary now that issue #25 is fixed. --- R/delong.R | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/R/delong.R b/R/delong.R index a382b8b..a8ecf70 100644 --- a/R/delong.R +++ b/R/delong.R @@ -120,13 +120,7 @@ delongPlacements <- function(roc) { auc <- 1 - auc } if (! isTRUE(all.equal(placements$theta, auc))) { - # Sometimes we set percent <- FALSE but it is actually true - # Ideally this should be fixed in the code so that percent is always correct, - # but theta is unlikely to be off by a factor 100 exactly, - # so this should do as a quick hack - if (! isTRUE(all.equal(placements$theta, auc / 100))) { - stop(sprintf("A problem occured while calculating DeLong's theta: got %.20f instead of %.20f. This is a bug in pROC, please report it to the maintainer.", placements$theta, auc)) - } + stop(sprintf("A problem occured while calculating DeLong's theta: got %.20f instead of %.20f. This is a bug in pROC, please report it to the maintainer.", placements$theta, auc)) } return(placements)