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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
You can use the fact that n! = gamma(n+1): 3 * 2 [1] 6> gamma(4)[1] 6> > 4 * 3 * 2[1] 24> gamma(5)[1] 24 and so on. Hope this helps. Matthew Wiener Applied Computer Science & Mathematics Dept. Merck Research Labs Rahway, NJ 07090 732-594-5303 -----Original Message----- From: Ricardo Da-Silva [mailto:ricardo at icmc.usp.br] Sent: Wednesday, July 03, 2002 1:55 PM To: r-help at stat.math.ethz.ch Subject: [R] Factorial 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. _._ ------------------------------------------------------------------------------ Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that may be confidential, proprietary copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please immediately return this by e-mail and then delete it. ============================================================================= -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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?:> 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._