I wrote:

> I was bitten by the behavior of all() when given logical(0):  
> It is TRUE!
> (And any(logical(0)) is FALSE.)  Wouldn't it be better to 
> return logical(0)
> in both cases?

I guess the behavior is consistent with:

> prod(numeric(0))
[1] 1
> sum(numeric(0))
[1] 0

but why?

Andy

>

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to