[R] Factorial function in R?

Marc Schwartz MSchwartz at medanalytics.com
Fri Jun 13 06:18:34 CEST 2003


On Thu, 2003-06-12 at 19:53, Ko-Kang Kevin Wang wrote:
> 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?


There is the factorial() function in the gregmisc package on CRAN,
otherwise the gamma() function as has been mentioned.

HTH,

Marc Schwartz




More information about the R-help mailing list