Skip to content

Commit 3f01c39

Browse files
committed
Move fun.sesp definition out of roc()
This avoids creating a new function in each call of roc(), which causes the function to have different environments each call. Works around LudvigOlsen/cvms#44.
1 parent 5b8d051 commit 3f01c39

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: pROC
22
Type: Package
33
Title: Display and Analyze ROC Curves
4-
Version: 1.19.0
5-
Date: 2025-07-30
4+
Version: 1.19.0.1
5+
Date: 2025-07-31
66
Encoding: UTF-8
77
Depends: R (>= 2.14)
88
Imports: methods, Rcpp (>= 0.11.1)

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
1.19.0.1 (2025-07-31)
2+
* Move 'fun.sesp' definition to work around LudvigOlsen/cvms#44
3+
14
1.19.0 (2025-07-30)
25
* 'ci.coords' can now take the same 'input' values as 'coords' (issue #90)
36
* 'ci.coords' can be 'plot'ted

R/roc.R

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -450,10 +450,7 @@ roc_cc_nochecks <- function(controls, cases, percent, direction, smooth, smooth.
450450
roc$direction <- direction
451451
roc$cases <- cases
452452
roc$controls <- controls
453-
roc$fun.sesp <- function(...) {
454-
warning("pROC::roc$fun.sesp is deprecated")
455-
roc_utils_perfs_all(...)
456-
}
453+
roc$fun.sesp <- roc_utils_fun_sesp
457454

458455
if (smooth) {
459456
roc <- smooth.roc(roc, method = smooth.method, n = smooth.n, ...)

R/roc.utils.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ roc_utils_perfs_all <- function(thresholds, controls, cases, direction) {
5454
return(list(se = se, sp = sp))
5555
}
5656

57+
roc_utils_fun_sesp <- function(...) {
58+
warning("pROC::roc$fun.sesp is deprecated")
59+
roc_utils_perfs_all(...)
60+
}
61+
5762
# returns a vector with two elements, sensitivity and specificity, given the threshold at which to evaluate the performance, the values of controls and cases and the direction of the comparison, a character '>' or '<' as controls CMP cases
5863
# sp <- roc_utils_perfs(...)[1,]
5964
# se <- roc_utils_perfs(...)[2,]

0 commit comments

Comments
 (0)