Re: [R] product of vector elements

2008-01-12 Thread Gerard Smits
Thanks for cumprod() and prod(). I should have tried the help.search first. Next time Gerard At 04:55 PM 1/12/2008, Gabor Grothendieck wrote: >help.search("product") > >On Jan 12, 2008 7:38 PM, Gerard Smits <[EMAIL PROTECTED]> wrote: > > All, > > > > I would like to find a simper method th

Re: [R] product of vector elements

2008-01-12 Thread Daniel Nordlund
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf > Of Gerard Smits > Sent: Saturday, January 12, 2008 4:39 PM > To: r-help@r-project.org > Subject: [R] product of vector elements > > All, > > I would like to find a simper

Re: [R] product of vector elements

2008-01-12 Thread Gabor Grothendieck
help.search("product") On Jan 12, 2008 7:38 PM, Gerard Smits <[EMAIL PROTECTED]> wrote: > All, > > I would like to find a simper method that I now have to find the > product of all elements in a vector: > > #get product of vector elements: (1,2,3,4,5) > vec.product <- exp(sum(log(c(1,2,3,4,5

Re: [R] product of vector elements

2008-01-12 Thread Chuck Cleland
On 1/12/2008 7:38 PM, Gerard Smits wrote: > All, > > I would like to find a simper method that I now have to find the > product of all elements in a vector: > > #get product of vector elements: (1,2,3,4,5) > vec.product <- exp(sum(log(c(1,2,3,4,5 > > I have not found a vector product funct

[R] product of vector elements

2008-01-12 Thread Gerard Smits
All, I would like to find a simper method that I now have to find the product of all elements in a vector: #get product of vector elements: (1,2,3,4,5) vec.product <- exp(sum(log(c(1,2,3,4,5 I have not found a vector product function, if one has been written. Thanks, Gerard [[al