Re: [Rd] prod(numeric(0)) surprise

2006-01-08 Thread Martin Maechler
> "Ben" == Ben Bolker <[EMAIL PROTECTED]> > on Sun, 08 Jan 2006 21:40:05 -0500 writes: Ben> Duncan Murdoch wrote: >> On 1/8/2006 9:24 PM, Ben Bolker wrote: >> >>> It surprised me that prod(numeric(0)) is 1. I guess if >>> you say (operation(nothing) == identity el

[Rd] Problem installing from source: no CONTENTS files

2006-01-08 Thread Mark.Bravington
I've just had the error below while trying to install a package from source under R2.2.1 and Windows XP. I recall encountering this sporadically in the past. It is a pretty confusing message and took me quite some time to figure out; I've seen queries about it on the R site search, but couldn't fin

Re: [Rd] prod(numeric(0)) surprise

2006-01-08 Thread Ben Bolker
Duncan Murdoch wrote: > On 1/8/2006 9:24 PM, Ben Bolker wrote: > >>It surprised me that prod(numeric(0)) is 1. >> I guess if you say (operation(nothing) == identity >> element) this makes sense, but ?? > > > What value were you expecting, or were you expecting an error? I can't > think how

Re: [Rd] prod(numeric(0)) surprise

2006-01-08 Thread Duncan Murdoch
On 1/8/2006 9:24 PM, Ben Bolker wrote: >It surprised me that prod(numeric(0)) is 1. > I guess if you say (operation(nothing) == identity > element) this makes sense, but ?? What value were you expecting, or were you expecting an error? I can't think how any other value could be justified, an

[Rd] prod(numeric(0)) surprise

2006-01-08 Thread Ben Bolker
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)) prod