

bin2(ash)                                    R Documentation

_B_i_n _b_i_v_a_r_i_a_t_e _d_a_t_a _x

_U_s_a_g_e_:

     bin2(x, ab, nbin)

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

       x: (input matrix with 2 columns) data sample

      ab: (input 2 x 2 matrix) rows 1 and 2 contain x and y
          axis bin intervals, respectively.  If not speci-
          fied, the ranges are stretched by 5% at each end
          for each dimension.

    nbin: (input vector of length 2) number of bins along x
          and y axes. Default is 20 by 20.

_V_a_l_u_e_:

     `bin2' returns a list including the bivariate bin
     matrix and the number of points outside the ab rectan-
     gle.

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

     `ash2'

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

     x <- matrix( rnorm(200), 100 , 2)       # bivariate normal n=100
     ab <- matrix( c(-5,-5,5,5), 2, 2)       # interval [-5,5) x [-5,5)
     nbin <- c( 20, 20)                      # 400 bins
     bins <- bin2(x, ab, nbin)               # bin counts,ab,nskip

