bin1                   package:ash                   R Documentation

_u_n_i_v_a_r_i_a_t_e _b_i_n_n_i_n_g

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

     Function to compute array of bin counts for a data vector

_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 messages, 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

