A function which splits a bin based on the location maximizing a score function.
sandboxMaxSplit(
bin,
scorer,
ties = halfCutTie,
minExp = 5,
pickMax = which.max,
...
)
A list of two bins resulting from the split of `bin` along the corresponding margin at the maximum location
a bin to be split with elements `x`, `y`, `depth`, `bnds` (list with elements `x` and `y`), `expn`, `n`
function which accepts a numeric vector of potential split coordinates and the bounds of `bin` and returns a numeric vector of scores for each
function which is called to break ties when all splits generate the same score
value giving the smallest expected count allowed for bin splits
function which accepts a list of scores and returns the element of the largest score according to some rule
optional additional arguments to `scorer`
Chris Salahub
This function serves as a wrapper which manages the interaction of a score function, marginal splitting functions, tie breaking function, and a maximum selection function to split a bin at the observation coordinate which maximizes the score function.