Skip to content

Factorial

5 messages · Ricardo Da-Silva, Alvaro Colina, John Fox +1 more

#
Dear R Users

Could someone tell me if R has a internal function or package to perfome 
factorial calculations, like 32!,?

Thanks
Rick.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
El mi?, 03-07-2002 a las 19:55, Ricardo Da-Silva escribi?:
Try gamma(n-1)
#
Dear Ricardo,

You can use gamma(33).

John
On Wed, 3 Jul 2002, Ricardo Da-Silva wrote:

            
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Alvaro Colina wrote:
However, it's usually safer to use lgamma(n-1) instead if n is large (as
in n=32). lgamma(x) returns the log of the gamma function which will be
a more managable number for computational purposes.
[1] 74.65824
[1] 2.652529e+32

Regards,

Sundar
#
Sorry. Make that lgamma(n+1). Not n-1.
Alvaro Colina wrote: