rect.box.idx            package:rflowcyt            R Documentation

_S_u_p_e_r_i_m_p_o_s_e_s _a _r_e_c_t_a_n_g_l_e _o_n _a_n _e_x_i_s_t_i_n_g _p_l_o_t _g_i_v_e_n _p_o_s_i_t_i_o_n_a_l _i_n_d_i_c_i_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     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.

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

      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

_D_e_t_a_i_l_s:

     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.

_V_a_l_u_e:

_A_u_t_h_o_r(_s):

     A.J. Rossini and J.Y. Wan

_R_e_f_e_r_e_n_c_e_s:

     See details in 'rfcprim'

_S_e_e _A_l_s_o:

     'ContourScatterPlot', 'rfcprim' library

_E_x_a_m_p_l_e_s:

     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")
     }
     }
     }

