plotBinning {AssocBin}R Documentation

Plot a binning using shaded rectangles

Description

Use a binning and vector of fill colours to visualize the sample space of pairwise data.

Usage

plotBinning(bins, fill, add = FALSE, xlab = "x", ylab = "y", ...)

Arguments

bins

list of lists each with a named elements 'x', 'y', and 'bnds', the last of which is a list having named elements 'x' and 'y'

fill

vector of values which can be interpreted as colours of the same length as 'bins'

add

logical, should the plot of bins be added to the current plot area?

xlab

string, the label to be placed on the x axis

ylab

string, the label to be placed on the y axis

...

optional additional arguments to be passed to 'plot', 'points'

Details

'plotBinning' plots each bin within a list of bins with custom shading to communicate large residuals, the depth of bins, or highlight particular bins

Value

A list of lists each with elements 'x', 'y', 'bnds', 'expn', and 'n'.

Author(s)

Chris Salahub

Examples

bin <- list(x = 1:10, y = sample(1:10),
            bnds = list(x = c(0, 10), y = c(0, 10)),
            expn = 10, n = 10, depth = 0)
bin2 <- halfSplit(bin, "x")
bin3 <- unlist(lapply(bin2, maxScoreSplit, scorer = chiScores),
               recursive = FALSE)
plotBinning(bin3)

[Package AssocBin version 0.1-0 Index]