rect.box.idx {rflowcyt} | R Documentation

## Superimposes a rectangle on an existing plot given positional indicies

### Description

The boundaries of a rectangle are determined from a vector of positional indicies 'box.idx' and the given variables, 'x1' and 'x2'. This box is then displayed on the existing plot.

### Usage

    rect.box.idx(x1, x2, box.idx = NULL,
        original.data.idx = 1:length(x1),
        border = "black", lwd = 3, ...)

### Arguments

`x1` | vector of values for variable 1
`x2` | vector of values for variable 2
`box.idx` | vector of positional indicies that indicate the box to be shown
`original.data.idx` | positional values of the current 'x1' and 'x2' observations
`border` | the color of the outline of the box or rectangle
`lwd` | the width of the lines of the box
`...` | other options in rect

### Details

This function would be coupled with the use of ContourScatterPlot to show the boxes obtained by 'do.PRIM' (Patient Rule Induction Method) from the rfcprim package. PRIM is a semi-automated bump-hunting program.

### Value

### Author(s)

A.J. Rossini and J.Y. Wan

### References

See details in rfcprim

### See Also

`ContourScatterPlot`, rfcprim library

### Examples

    if (require(rfcdmin)){

    data(PRIM.example.data)

    if (require(rfcprim)){

    ## only the peeling step is implemented
    out.peel <- peel.step(X.PRIM, Y.PRIM)

    if (interactive()){
    ContourScatterPlot(X.PRIM[,1], X.PRIM[,2],  status=Y.PRIM,
       main="z statistic",
       xlab=col.nm[4],
       ylab=col.nm[5], image.col=heat.colors(20),plot.legend.CSP=TRUE)
    ## the Green box is the initial estimate of the first rule
    ## after the peeling step
    rect.box.idx(out.peel@best.box.idx, X.PRIM[,1], X.PRIM[,2], border="green")
    }
    }
    }

[Package rflowcyt version 1.4.0 Index]