

bin1(ash)                                    R Documentation

_F_u_n_c_t_i_o_n _t_o _c_o_m_p_u_t_e _a_r_r_a_y _o_f _b_i_n _c_o_u_n_t_s _f_o_r _a _d_a_t_a _v_e_c_t_o_r

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

     bin1(x, ab, nbin=50)

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

       x: (input) data vector

      ab: (input vector of length 2):  half-open interval
          for bins [a,b).  If no value is specified, the
          range of x is stretched by 5% at each end and used
          the interval.

    nbin: (input integer):  number of bins desired. Default
          50.

     opt: (input OPTIONAL logical):  to suppress output mes-
          sages, set `opt=TRUE'

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

     `bin1' returns a list including the vector of integer
     bin counts and the ab vector and the number of points
     outside the ab interval.

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

     `ash1'

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

     x <- rnorm(100)         # data vector
     ab <- c(-5,5)           # bin interval
     bins <- bin1(x,ab,10)     # bin x into 10 bins over ab

