[R] 'all' inconsistent?
Seth Falcon
sfalcon at fhcrc.org
Mon Jan 30 16:49:05 CET 2006
On 30 Jan 2006, ligges at statistik.uni-dortmund.de wrote:
> Current behaviour is consistent in so far that identical(all(x),
> !any(!x)) is TRUE and definition of any() is obvious.
That helps, thanks. I'm not sure I've had enough coffee to continue,
but, for the set analogy I think we are saying:
logical(0) is the empty set {}.
Complement of {} is the universal set U.
Then !logical(0) == !{} == U. any(U) is TRUE, isn't it?
I guess the real message is that you need to protect yourself by
testing for positive length first.
+ seth
More information about the R-help
mailing list