| 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,
  factor = 0.5,
  xlab = "x",
  ylab = "y",
  suppressLabs = FALSE,
  border = "black",
  ...
)
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? | 
| factor | number between 0 and 1, what factor should be applied to jittering of categorical variables? | 
| xlab | string, the label to be placed on the x axis | 
| ylab | string, the label to be placed on the y axis | 
| suppressLabs | logical, should axis labels be suppressed or displayed? | 
| border | argument to be passed to 'rect' internally giving the border colour | 
| ... | 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. It automatically jitters points within categorical levels to avoid overplotting.
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)