search for: ndist2

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

Did you mean: ndist
2011 Mar 15
1
indeterminate for loop
...rows each time. The results of the calculation change as less data is used, but not in a predictable way, therefore the end point of the loop is indeterminate. The script is long and the datasets big, but a simplified example where 'A' and 'B' are datasets, and the function 'ndist2' calculates 'x' is... for (i in 1:100) { C <- data.frame(ndist2(B,A)) C1 <- subset(C, x = min(C$x)) B <- rbind(B, C1) A <- subset(C, x > min(C$x)) } So eventually A runs out. Currently, I let the loop run until a warning comes up which effectively says no more data, a...