Sometimes defective wells cause some functions to crash. Given a list of wells, this function will bisect the list until it converges to the well(s) that cause a given function to crash.
Usage
bisectError(f, l, min = 1L, max = length(l), prevMin = NA, prevMax = NA)
Arguments
- f
A function that crashes on some wells
- l
A list of wells
- min
The smaller index to start with (defaults to 1)
- max
The larger index to stop with (defaults to list length)
- prevMin, prevMax
Arguments used to pass previous state in recursion
Value
A numeric vector of two integers representing the smallest range of indices necessary to crash the function.