Skip to content
Prev 55725 / 63424 Next

ROBUSTNESS: x || y and x && y to give warning/error if length(x) != 1 or length(y) != 1

On Thu, Aug 30, 2018 at 10:58 AM Martin Maechler
<maechler at stat.math.ethz.ch> wrote:
Can you explain your reasoning a bit more here? I'd like to understand
the general principle, because from my perspective it's more
parsimonious to say that the inputs to || and && must be length 1,
rather than to say that inputs could be length 0 or length 1, and in
the length 0 case they are replaced with NA.

Hadley

Thread (15 messages)

Henrik Bengtsson ROBUSTNESS: x || y and x && y to give warning/error if length(x) != 1 or length(y) != 1 Aug 28 Emil Bode ROBUSTNESS: x || y and x && y to give warning/error if length(x) != 1 or length(y) != 1 Aug 30 Joris Meys ROBUSTNESS: x || y and x && y to give warning/error if length(x) != 1 or length(y) != 1 Aug 30 Tóth Dénes ROBUSTNESS: x || y and x && y to give warning/error if length(x) != 1 or length(y) != 1 Aug 30 Tóth Dénes ROBUSTNESS: x || y and x && y to give warning/error if length(x) != 1 or length(y) != 1 Aug 30 Joris Meys ROBUSTNESS: x || y and x && y to give warning/error if length(x) != 1 or length(y) != 1 Aug 30 Emil Bode ROBUSTNESS: x || y and x && y to give warning/error if length(x) != 1 or length(y) != 1 Aug 30 Hadley Wickham ROBUSTNESS: x || y and x && y to give warning/error if length(x) != 1 or length(y) != 1 Aug 30 William Dunlap ROBUSTNESS: x || y and x && y to give warning/error if length(x) != 1 or length(y) != 1 Aug 30 Martin Maechler ROBUSTNESS: x || y and x && y to give warning/error if length(x) != 1 or length(y) != 1 Aug 30 Rui Barradas ROBUSTNESS: x || y and x && y to give warning/error if length(x) != 1 or length(y) != 1 Aug 30 Joris Meys ROBUSTNESS: x || y and x && y to give warning/error if length(x) != 1 or length(y) != 1 Aug 30 Hadley Wickham ROBUSTNESS: x || y and x && y to give warning/error if length(x) != 1 or length(y) != 1 Aug 30 Emil Bode ROBUSTNESS: x || y and x && y to give warning/error if length(x) != 1 or length(y) != 1 Aug 31 Henrik Bengtsson ROBUSTNESS: x || y and x && y to give warning/error if length(x) != 1 or length(y) != 1 Aug 31