rUnifSplit: Random uniform splitting

rUnifSplitR Documentation

Random uniform splitting

Description

Split bins randomly and uniformly

Usage

rUnifSplit(bin, minExp = 0, 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 samples a coordinate uniformly along a random margin and splits a bin at that coordinate. In contrast to maxScoreSplit with randScores, this can introduce splits at locations other than the points.

Value

A list of two bins resulting from the split of 'bin' at a random location on a random margin

Author(s)

Chris Salahub

Examples

bin <- makeBin(x = 1:10, y = sample(1:10))
rUnifSplit(bin, minExp = 2)

AssocBin documentation built on April 3, 2025, 7:46 p.m.