uniRIntSplit {AssocBin} | R Documentation |
Univariate random integer splitting
Description
A function which splits a bin along x at a random integer conforming to limits on minimum bin size.
Usage
uniRIntSplit(bin, minExp = 5)
Arguments
bin |
a bin to be split with elements 'x', 'y', 'depth', 'bnds' (list with elements 'x' and 'y'), 'expn', 'n' |
minExp |
numeric giving the minimum expected count allowed in a bin |
Details
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 along a single margin at the observation coordinate which maximizes the score function.
Value
A list of two bins resulting from the split of 'bin' along the corresponding margin at the maximum location
Author(s)
Chris Salahub
Examples
bin <- makeBin(x = 1:10, y = sample(1:10))
rIntSplit(bin, minExp = 2)
[Package AssocBin version 1.0-0 Index]