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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Factorial
5 messages · Ricardo Da-Silva, Alvaro Colina, John Fox +1 more
El mi?, 03-07-2002 a las 19:55, Ricardo Da-Silva escribi?:
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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Try gamma(n-1)
================================================== Alvaro Colina Area de Quimica Analitica. Facultad de Ciencias. Universidad de Burgos. Pza. Misael Banuelos s/n. 09001. Burgos. Spain Phone: 34-947-258817 FAX: 34-947-258831 e-mail: acosa at ubu.es http://www2.ubu.es/quim/quimana/index.shtml ================================================== -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Dear Ricardo, You can use gamma(33). John
On Wed, 3 Jul 2002, Ricardo Da-Silva wrote:
Could someone tell me if R has a internal function or package to perfome factorial calculations, like 32!,?
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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:
El mi?, 03-07-2002 a las 19:55, Ricardo Da-Silva escribi?:
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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Try gamma(n-1)
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.
lgamma(31)
[1] 74.65824
gamma(31)
[1] 2.652529e+32 Regards, Sundar
Sundar Dorai-Raj, Ph.D. Statistical Methods Engineer PDF Solutions, Inc. Dallas TX (972) 889-3085 x216 (214) 392-7619 cell sundar.dorai-raj at pdf.com http://www.pdf.com/ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Sorry. Make that lgamma(n+1). Not n-1.
Alvaro Colina wrote:
El mi?, 03-07-2002 a las 19:55, Ricardo Da-Silva escribi?:
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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Try gamma(n-1) -- ================================================== Alvaro Colina Area de Quimica Analitica. Facultad de Ciencias. Universidad de Burgos. Pza. Misael Banuelos s/n. 09001. Burgos. Spain Phone: 34-947-258817 FAX: 34-947-258831 e-mail: acosa at ubu.es http://www2.ubu.es/quim/quimana/index.shtml ================================================== -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Sundar Dorai-Raj, Ph.D. Statistical Methods Engineer PDF Solutions, Inc. Dallas TX (972) 889-3085 x216 (214) 392-7619 cell sundar.dorai-raj at pdf.com http://www.pdf.com/ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._