Date: Wed, 23 Jun 1999 19:38:15 +0100 (GMT)
From: Nicholas Lee <N.J.Lee@statslab.cam.ac.uk>
To: Alex Buerkle <cbuerkle@bio.indiana.edu>
Subject: Re: [R] does a factorial function exist
In-Reply-To: <Pine.LNX.4.10.9906231128390.4276-100000@tortoise.bio.indiana.edu>
On Wed, 23 Jun 1999, Alex Buerkle wrote:
>
> I've looked through the documentation with R-0.64.1 and have been unable
> to find a high-level function for evaluation of factorials (i.e., n!, not
> factorial designs). Is there such a function?
Try
function(n) {prod(1:n)}
Nicholas
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._