Displaying 1 result from an estimated 1 matches for "cytokinet".
Did you mean:
cytokine
2001 Oct 28
0
Summary: A speed improvement challenge
...y) ifelse(any(s<-abs(y-aty[i]) <
del),
sample(x[s], 1, replace=F, prob=freq[s]/sum(freq[s])),
approx(y, x, xout=aty[i], rule=2)$y),
x,y,freq,aty)
===================================================================
Vadim Kutsyy, PhD http://www.kutsyy.com
vkutsyy at cytokinetics.com vadim at kutsyy.com
Statistician
----------------------------------------------------------------------------
Off the top of my head:
First, move the test
any( (s <- abs(y-aty[i])) < del )
outside the loop. I...