Factorial function in R?
AFAIK there isn't one. You need to use gamma() or prod() (or writing up a recursive function if you want to be inefficient ;-D).
On Fri, 13 Jun 2003 Peter.Caley at csiro.au wrote:
Date: Fri, 13 Jun 2003 10:44:40 +1000 From: Peter.Caley at csiro.au To: r-help at stat.math.ethz.ch Subject: [R] Factorial function in R? Is there a native factorial function in R [my searches have been fruitless], or do I need to use gamma() function? ********************************************************************* Dr Peter Caley CSIRO Entomology GPO Box 1700, Canberra, ACT 2601 Email: peter.caley at csiro.au Ph: +61 (0)2 6246 4076 Fax: +61 (0)2 6246 4000 ********************************************************************* [[alternate HTML version deleted]]
______________________________________________ R-help at stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Cheers, Kevin ------------------------------------------------------------------------------ "On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question." -- Charles Babbage (1791-1871) ---- From Computer Stupidities: http://rinkworks.com/stupid/ -- Ko-Kang Kevin Wang Master of Science (MSc) Student SLC Tutor and Lab Demonstrator Department of Statistics University of Auckland New Zealand Homepage: http://www.stat.auckland.ac.nz/~kwan022 Ph: 373-7599 x88475 (City) x88480 (Tamaki)