scatterbox: Plot scatterplots of data with boxes shown

Description Usage Arguments Value Author(s) References Examples

View source: R/scatterbox.r

Description

Function for plotting scatterplots of cases, with points color-coded by relevance and with two-dimensional projections of scenarios-as-boxes.

Usage

1
2
3
scatterbox(boxseq, boxnum = 1, xdim, ydim, filterdims = FALSE, 
  filterothers = FALSE, nobox = FALSE, addbox = FALSE, 
  data = attr(boxseq, "data"), y = NULL, manualbox = FALSE, ...)

Arguments

boxseq

A box sequence object as ouput by sdprim. Alternatively, a manually created list of box definitions (see details.

boxnum

Integer - Which box in the box sequence should be plotted?

xdim

Integer or Character - Which dimension should be plotted as the x-axis? The safest way is to specify the dimension name. See details.

ydim

Integer or Character - Which dimension should be plotted as the y-axis? The safest way is to specify the dimension name. See details.

filterdims

Logical - If a box is defined by more than just the two dimensions that are being plotted, should points filtered out by the other dimensions be removed from the scatter plot? See details.

filterothers

Specifies whether and how points captured by other boxes should be filtered out. Either TRUE, FALSE, “PREV” or a vector of numerics. TRUE removes points captured by all other boxes. FALSE removes none. “PREV” removes any boxes that came earlier in the covering sequence. Alternatively, a vector of integers may be specified indicating which boxes should have their points removed. Note that in all cases, boxes may overlap and specifying this option may result in not all points in the current box being shown.

nobox

Logical - should the scatterplot be generated, but with no box plotted?

addbox

Logical - should a different box be plotted on the same scatterplot? Note that depending on how points were filtered and which dimensions are involved, this may or may not be misleading.

data

Matrix - the data to use in generating the scatterplots. The default is to use the data attribute returned by sdprim. If this is not used for some reason (such as training versus test data), the dataset should have the same number of dimensions, same dimension names, and same dimension ordering as that used to generate the boxes.

y

Vector of zeros and ones indicating interestingness or uninterestingness of points. If left as NULL, it will assume the item data above is of the form returned by sdprim.

manualbox

Logical - Is the boxseq argument given a manually generated box list not conforming to the output of sdprim? This may be handy if you want to plot boxes or box sequences that you specified yourself independent of sdprim. See details for how to construct such a box.

...

Arguments that may be passed on to pbox and colptplot.

Value

Nothing returned, used for its plotting capabilities.

Author(s)

Benjamin P. Bryant, bryant@prgs.edu

References

RAND Pardee Center: http://www.rand.org/international\_programs/pardee/

Examples

1
2
data(exboxes)
scatterbox(exboxes,xdim="stations",ydim="depth") 

Example output



sdtoolkit documentation built on May 2, 2019, 6:04 a.m.