Re: [S] Re: Factorials in S-PLUS: over-under
Mon, 30 Mar 1998 21:35:32 -0600

The function choose(n,k,order.matters=F) is part of the basic library in
S+ 4.0 for windows. So is choose.multinomial(n,m), where m is a vector
whose sum of elements is n. The reason for both of them apparently is the
order.matters option in choose. Both use the
exp(lgamma(n+1)-sum(lgamma(m+1)) expression mentioned in the list a while
back. (For choose(), it is exp(lgamma(n+1)-lgamma(n-k+1)-{either lgamma(k+1)
or 0 depending on whether order.matters=F or T}).

I'm sorry for not leaving the version. The answer I sent was intended for
the user only and got sent to snews due to haste. (I know that's not the
point). Admittedly, the user also needs to know the version. I will try
to be more careful in my answering policies. This is not the first time
I've sent replies to the list by accident.

This one _has_ to be sent to the group, though.
L Thompson
This message was distributed by To unsubscribe
send e-mail to with the BODY of the
message: unsubscribe s-news