makeBin {AssocBin}R Documentation

Make a bin

Description

Creating a new bin object

Usage

makeBin(
  x,
  y,
  bnds = list(x = range(x) - c(1, 0), y = range(y) - c(1, 0)),
  expn = length(x),
  n = length(x),
  depth = 0,
  stopped = FALSE
)

Arguments

x

numeric vector of observations on the first variable

y

numeric vector of observations on the second variable

bnds

list of length two with named elements 'x' and 'y' each a vector of length two giving respective bin boundaries

expn

expected number of points in the bin, can be non-integer

n

observed count of points in the bin

depth

number of splits from the initial bin to the bin

stopped

logical; should the bin be split further?

Details

'makeBin' creates a bin list based on the arguments provided to it. Should some be missing, basic defaults ensure that the complete set of bin characteristics are created in the resulting list representing the bin object.

Value

A list with named elements matching these arguments

Author(s)

Chris Salahub

Examples

makeBin(x = 1:10, y = sample(1:10),
bnds = list(x = c(0,10), y = c(0, 10)), expn = 10, n = 10,
depth = 0, stopped = FALSE)

[Package AssocBin version 1.0-0 Index]