you can create your own function: > fact <- function(n) prod(1:n) > fact(3) [1] 6 > fact(10) [1] 3628800 > fact(c(3,4)) [1] 6 Warning message: Numerical expression has 2 elements: only the first used in: 1:n
fact() will work for scalars but doesn't do well with vectors. Dave Richmond On Saturday, February 15, 2003, at 07:33 PM, 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
______________________________________________ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
