Re: [R] ! arithmetic

About this list Date view Thread view Subject view Author view Attachment view

From: Marc Schwartz (MSchwartz@medanalytics.com)
Date: Sun 16 Feb 2003 - 15:05:49 EST


Message-id: <3E4F0E1D.3080705@MedAnalytics.com>

Stan Markus wrote:
> Since "!" is a logical operator in R, how does one use it in its arithmetic sense, say to calculate x!/y!(N-y)! ?
>
> Thanks!
>
> Stan

You can use gamma(x + 1) for x! or you can use the factorial() function
in the gregmisc package on CRAN.

See ?gamma for the former option.

HTH,

Marc Schwartz

______________________________________________
R-help@stat.math.ethz.ch mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Tue 01 Jul 2003 - 09:11:22 EST