On Thu, 6 Jul 2000, Pete Hurd wrote:
> Dear R friends,
>
> I was wondering if there were factorial and modulus functions out there
> that I've somehow overlooked?
There's gamma and lgamma for factorials
gamma(x+1) is x! and lgamma(x+1) is log(x!). Also choose() and
lchoose() for the binomial coefficients.
x %% y does x mod y.
-thomas
Thomas Lumley
Assistant Professor, Biostatistics
University of Washington, Seattle
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._