Re: [R] Procuct of a sequence or vector

2011-01-20 Thread Henrique Dallazuanna
Take a look in prod function: prod(1:4) On Thu, Jan 20, 2011 at 3:18 PM, Jannis wrote: > Dear list, > > > is there a function in R that returns the product of a vector? > > E.g. if the vector is c(1,2,3,4) it should return 1*2*3*4=24 > > > Cheers > Jannis > > > > > > > _

Re: [R] Procuct of a sequence or vector

2011-01-20 Thread jim holtman
Is this what you want: > prod(c(1,2,3,4)) [1] 24 > On Thu, Jan 20, 2011 at 12:18 PM, Jannis wrote: > Dear list, > > > is there a function in R that returns the product of a vector? > > E.g. if the vector is c(1,2,3,4) it should return 1*2*3*4=24 > > > Cheers > Jannis > > > > > > > _

[R] Procuct of a sequence or vector

2011-01-20 Thread Jannis
Dear list, is there a function in R that returns the product of a vector? E.g. if the vector is c(1,2,3,4) it should return 1*2*3*4=24 Cheers Jannis __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do re