xyTable              package:grDevices              R Documentation

_M_u_l_t_i_p_l_i_c_i_t_i_e_s _o_f (_x,_y) _P_o_i_n_t_s, _e._g., _f_o_r _a _S_u_n_f_l_o_w_e_r _P_l_o_t

_D_e_s_c_r_i_p_t_i_o_n:

     Given (x,y) points, determine their multiplicity - checking for
     equality only up to some (crude kind of) noise.  Note that this is
     special kind of 2D binning.

_U_s_a_g_e:

     xyTable(x, y = NULL, digits)

_A_r_g_u_m_e_n_t_s:

     x,y: numeric vectors of the same length; alternatively other (x,y)
          argument combinations as allowed by 'xy.coords(x,y)'.

  digits: integer specifying the significant digits to be used for
          determining equality of coordinates.  These are compared
          after rounding them via 'signif(*,digits)'.

_V_a_l_u_e:

     A list with three components of same length, 

       x: x coordinates, rounded and sorted.

       y: y coordinates, rounded (and sorted within 'x').

  number: multiplicities (positive integers); i.e., 'number[i]' is the
          multiplicity of '(x[i],y[i])'.

_S_e_e _A_l_s_o:

     'sunflowerplot' which typically uses 'xyTable()'; 'signif'.

_E_x_a_m_p_l_e_s:

     xyTable(iris[,3:4], digits = 6)

     ## Discretized uncorrelated Gaussian:

     require(stats)
     xy <- data.frame(x = round(sort(rnorm(100))), y = rnorm(100))
     xyTable(xy, digits = 1)

