search for: fnfind

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

Did you mean: f_find
2011 Jan 26
0
Fwd: MAtrix addressing
...19 20 21 22 23 24 0.333333333333333 25 26 27 28 29 30 0.666666666666667 31 32 33 34 35 36 > fnfind <- function(x,y) mtx[ findInterval(x, c(as.numeric(rownames(mtx)), 1)), + findInterval(y, c(as.numeric(colnames(mtx)), 1))] > fnfind(.5,.5) [1] 29 > fnfind(-.5,-.5) [1] 8 This could obviously be made more compact, but the current form allows simple mod...