Is this what you want: > prod(c(1,2,3,4)) [1] 24 >
On Thu, Jan 20, 2011 at 12:18 PM, Jannis <bt_jan...@yahoo.de> 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-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Jim Holtman Data Munger Guru What is the problem that you are trying to solve? ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.