Skip to content
Back to formatted view

Raw Message

Message-ID: <1055470899.31195.2.camel@localhost>
Date: 2003-06-13T04:18:34Z
From: Marc Schwartz
Subject: Factorial function in R?
In-Reply-To: <Pine.LNX.4.44.0306131252200.20258-100000@stat61.stat.auckland.ac.nz>

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