search for: tp25284189p25284359

Displaying 1 result from an estimated 1 matches for "tp25284189p25284359".

2009 Sep 03
2
Recursion is slow
The following recursion is about 120 times faster in C#. I know R is not known for its speed with recursions but I'm wondering if anyone has a tip about how to speed things up in R. #"T" is a vector and "m" is a number between 1 and sum(T) A <- function(T,m) { lt <- length(T) if (lt == 1) { if (0 <= m & m <= T[1]) { return(1) } else { return(0) }