From: Zhen Pang <nusbj_at_hotmail.com>

Date: Fri 27 May 2005 - 10:29:58 EST

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri May 27 10:35:45 2005

Date: Fri 27 May 2005 - 10:29:58 EST

I'd like to define a k by k matrix where the element is defined by

mn<-function(m,n) sum(choose(m,(m-0:m))*choose((k-m),(n-m+0:m)))

the mn function works fine for scalar m and n, however, it fails to define the matrix by outer.

I can define this matrix by loop or some apply function, however, the outer function should be the most straitforward way. How to deal with it? Thanks.

Regards,

Zhen

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri May 27 10:35:45 2005

*
This archive was generated by hypermail 2.1.8
: Fri 03 Mar 2006 - 03:32:08 EST
*