rIntSplit {AssocBin}R Documentation

Random integer splitting

Description

A function which splits a bin at a random integer conforming to limits on minimum bin size.

Usage

rIntSplit(bin, minExp = 5, squarify = FALSE)

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

squarify

logical value, should we force splitting on the longer side?

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 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]