Displaying 1 result from an estimated 1 matches for "elbp".
Did you mean:
ebp
2011 Aug 02
1
My R code is not efficient
Dear R users,
I have two n*1 integer vectors, y1 and y2, where n is very very large.
I'd like to compute
elbp = 4^(y1) * 5^(y2) * sum_{i=0}^{max(y1, y2)} [{ (y1-i)! * (i)! *
(y2-i)! }^(-1)];
that is, I need to compute "elbp" for each (y1, y2) pair.
So I made R code like below, but I don't think it's efficient
Would you plz tell me how to avoid this "for" loop blow??
----...