Closed xrobin closed 5 years ago
Oh and I see the same behavior for the roc function...
Hi, thanks for the suggestion and nice to hear from you. The roc
function was designed for optimal speed and thus we didn't add support for NSE. Also, it wasn't exported in earlier versions and only became user-facing later.
I think the help pages describe the use of the functions correctly, but I must agree that the behavior is somewhat inconsistent.
On a more general note: When cutpointr
was designed, it wasn't already clear what would be the best way to do NSE and by now it seems that the way the tidyverse is doing it now (with !!
and so on) is the way forward. It would be best to eventually deprecate cutpointr_
, deprecate the use of quoted arguments in roc
and multi_cutpointr
(and possibly other functions?) and support the "rlang-way" throughout the package. I have to admit that I had this in mind for a while already, but it would to take some time to rewrite the functions. I'll mark this as an enhancement.
As of version 1.0.0 all main functions (cutpointr
, multi_cutpointr
, and roc
) make use of tidyeval, so the arguments can be quoted or unquoted and the !!
operator works. Only the x
argument of multi_cutpointr
stays a character vector. cutpointr_
is deprecated.
Not a big deal but somewhat surprising, I can do:
but not:
It would be nice to have NSE for multi_cutpointr too.