[R] factorial(), modulus()

Thomas Lumley thomas at biostat.washington.edu
Thu Jul 6 19:19:33 CEST 2000


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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list