[R] ! arithmetic
daver969 at yahoo.com
Sun Feb 16 07:58:03 CET 2003
you can create your own function:
> fact <- function(n) prod(1:n)
Numerical expression has 2 elements: only the first used in: 1:n
fact() will work for scalars but doesn't do well with vectors.
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)! ?
More information about the R-help