Skip to content
Prev 52333 / 63421 Next

R (development) changes in arith, logic, relop with (0-extent) arrays

Could we take a cue from min() and max()?
[1] 8
[1] Inf
Warning message:
In min(x[x > 11]) : no non-missing arguments to min; returning Inf
As ?min says, this is implemented to preserve transitivity, and this
makes a lot of sense.
I think the issuing of a warning here is a good compromise; I can
always turn off warnings if I want.

I find this behaviour of min() and max() to be annoying in the *right*
way: it annoys me precisely when I need to be
annoyed, that is, when I haven't thought through the consequences of
sending zero-length arguments.
On Fri, Sep 9, 2016 at 6:00 AM, Paul Gilbert <pgilbert902 at gmail.com> wrote: