It surprised me that prod(numeric(0)) is 1. I guess if you say (operation(nothing) == identity element) this makes sense, but ??
Looking in the code, this makes sense: basically (s=1; for i=0 to length(x), multiply s by x[i]) -- which comes out to 1. What *should* prod(numeric(0)) produce? I couldn't find the answer documented anywhere. (And how about sum(numeric(0))==0, which for some reason makes more intuitive sense to me, but is really exactly the same thing -- consider exp(sum(log(numeric(0)))) ... ?) cheers Ben Bolker -- 620B Bartram Hall [EMAIL PROTECTED] Zoology Department, University of Florida http://www.zoo.ufl.edu/bolker Box 118525 (ph) 352-392-5697 Gainesville, FL 32611-8525 (fax) 352-392-3704 ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel